[AIUTO] Problema forse banale...

Installazione, configurazione e uso di Ubuntu come server: web, ftp, mail, news, proxy, dns e altro.
marco.malavolti
Prode Principiante
Messaggi: 63
Iscrizione: lunedì 29 ottobre 2007, 2:42
Località: Carpi

[AIUTO] Problema forse banale...

Messaggio da marco.malavolti »

Questo è parte del mio error.log di Apache2:

Codice: Seleziona tutto

[error] [client XX.XX.XX.XXX] File does not exist: /resources, referer: https://dsc.lab.xxxx.it/opt/rr/
[error] [client XX.XX.XX.XXX] File does not exist: /resources, referer: https://dsc.lab.xxxx.it/opt/rr/
[error] [client XX.XX.XX.XXX] File does not exist: /css, referer: https://dsc.lab.xxxx.it/opt/rr/
[error] [client XX.XX.XX.XXX] File does not exist: /resources, referer: https://dsc.lab.xxxx.it/opt/rr/
[error] [client XX.XX.XX.XXX] File does not exist: /images, referer: https://dsc.lab.xxxx.it/opt/rr/

Sapete dirmi come fare a risolvere?

Io non capisco perchè i vari file.php riesce ad aprirmeli mentre queste cartelle no.

Cosa sbaglio?

P.S.: Se vi servono altre informazioni per capire meglio sarò lieto di fornirvele! Grazie!

Grazie a tutti!!!
Ultima modifica di marco.malavolti il martedì 17 gennaio 2012, 13:38, modificato 1 volta in totale.
Iron Bishop
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 624
Iscrizione: martedì 17 marzo 2009, 10:46
Contatti:

Re: [AIUTO] Problema forse banale...

Messaggio da Iron Bishop »

Verifica i permessi delle cartelle, devono essere "eseguibili" dall'utente con cui gira il webserver; metti 755 e dovrebbe andare.
marco.malavolti
Prode Principiante
Messaggi: 63
Iscrizione: lunedì 29 ottobre 2007, 2:42
Località: Carpi

Re: [AIUTO] Problema forse banale...

Messaggio da marco.malavolti »

Iron Bishop ha scritto: Verifica i permessi delle cartelle, devono essere "eseguibili" dall'utente con cui gira il webserver; metti 755 e dovrebbe andare.
Grazie della risposta, ma come puoi vedere i file e le cartelle in questione hanno i permessi giusti.

Codice: Seleziona tutto

-rw-r--r-- 1 root root  9030 16 gen 02.00 add_attribute.php
-rw-r--r-- 1 root root  8183 16 gen 02.00 add_intermediate_certs.php
-rw-r--r-- 1 root root  7244 16 gen 02.00 approve_homeorgs.php
-rw-r--r-- 1 root root 34805 16 gen 02.00 approve_resources.php
drwxr-xr-x 4 root root    73 16 gen 02.00 autosuggest_v2.1.3
-rw-r--r-- 1 root root 13888 16 gen 02.00 bootstrap_homeorg.php
-rwxr-xr-x 1 root root  1551 16 gen 02.00 cert_assistant.php
-rwxr-xr-x 1 root root  2923 16 gen 02.00 cert_info.php
-rw-r--r-- 1 root root  9201 16 gen 02.00 check_smstoken.php
drwxr-xr-x 2 root root    22 16 gen 02.00 css
-rwxr-xr-x 1 root root 11208 16 gen 02.00 download.php
-rw-r--r-- 1 root root  7091 16 gen 02.00 emergency.php
-rw-r--r-- 1 root root  1406 16 gen 02.00 favicon.ico
-rw-r--r-- 1 root root  8784 16 gen 02.00 gen_aap.php
-rw-r--r-- 1 root root 11527 16 gen 02.00 gen_arp.php
-rw-r--r-- 1 root root 22958 16 gen 02.00 gen_attribute-filter.php
-rwxr-xr-x 1 root root  3338 16 gen 02.00 gen_attribute-map.php
-rwxr-xr-x 1 root root  4236 16 gen 02.00 gen_attribute-policy.php
-rwxr-xr-x 1 root root 12170 16 gen 02.00 gen_attribute-resolver.php
-rw-r--r-- 1 root root  5283 16 gen 02.00 gen_edugain_metadata.php
-rwxr-xr-x 1 root root 19166 16 gen 02.00 gen_embedding_code.php
-rw-r--r-- 1 root root 43875 16 gen 02.00 gen_metadata.php
-rw-r--r-- 1 root root 36418 16 gen 02.00 gen_saml2md.php
-rwxr-xr-x 1 root root 32367 16 gen 02.00 gen_shibboleth2.php
-rw-r--r-- 1 root root  2106 16 gen 02.00 gen_stats.php
drwxr-xr-x 3 root root  4096 16 gen 02.00 images
-rw-r--r-- 1 root root 21918 16 gen 02.00 index.php
-rwxr-xr-x 1 root root  1282 16 gen 02.00 init.inc.php
-rwxr-xr-x 1 root root  1465 16 gen 02.00 init_non_ui.inc.php
drwxr-xr-x 2 root root  4096 16 gen 02.00 js
-rwxr-xr-x 1 root root  1558 16 gen 02.00 LICENSE
-rw-r--r-- 1 root root  3800 16 gen 02.00 list_attributes.php
-rw-r--r-- 1 root root  3760 16 gen 02.00 list_federation_partners.php
-rw-r--r-- 1 root root  1400 16 gen 02.00 list_federations.php
-rw-r--r-- 1 root root  4447 16 gen 02.00 list_homeorgs.php
-rw-r--r-- 1 root root 21517 16 gen 02.00 list_resources.php
-rw-r--r-- 1 root root  4321 16 gen 02.00 list_temp_resources.php
-rw-r--r-- 1 root root  4468 16 gen 02.00 list_used_certs.php
-rw-r--r-- 1 root root  3992 16 gen 02.00 list_user_admin_rights.php
-rw-r--r-- 1 root root  6862 16 gen 02.00 list_users.php
-rw-r--r-- 1 root root  3943 16 gen 02.00 logout.php
-rw-r--r-- 1 root root 23718 16 gen 02.00 manage_adminrights.php
-rw-r--r-- 1 root root  9300 16 gen 02.00 manage_federation_partners.php
-rw-r--r-- 1 root root 16711 16 gen 02.00 menu_dbadmin_options.php
-rw-r--r-- 1 root root  3367 16 gen 02.00 menu_homeorg_options.php
-rwxr-xr-x 1 root root  7498 16 gen 02.00 menu.php
-rw-r--r-- 1 root root 10165 16 gen 02.00 menu_res_options.php
-rw-r--r-- 1 root root  4918 16 gen 02.00 menu_rra_options.php
-rwxr-xr-x 1 root root  9196 16 gen 02.00 metadata_assistant.php
-rwxr-xr-x 1 root root 11528 16 gen 02.00 modify_homeorg_arp.php
-rwxr-xr-x 1 root root  8794 16 gen 02.00 modify_homeorg_attributes.php
-rwxr-xr-x 1 root root 16929 16 gen 02.00 modify_homeorg_certs.php
-rwxr-xr-x 1 root root  5004 16 gen 02.00 modify_homeorg_contacts.php
-rw-r--r-- 1 root root  8112 16 gen 02.00 modify_homeorg_descriptions.php
-rwxr-xr-x 1 root root 12861 16 gen 02.00 modify_homeorg_general.php
-rwxr-xr-x 1 root root  7916 16 gen 02.00 modify_homeorg_menu.php
-rwxr-xr-x 1 root root  8703 16 gen 02.00 modify_homeorg_setup.php
-rwxr-xr-x 1 root root 17942 16 gen 02.00 modify_homeorg_specific_arp.php
-rwxr-xr-x 1 root root 14586 16 gen 02.00 modify_homeorg_tech.php
-rw-r--r-- 1 root root  2963 16 gen 02.00 modify_resource.php
-rw-r--r-- 1 root root  4155 16 gen 02.00 remove_resource.php
-rw-r--r-- 1 root root 14233 16 gen 02.00 res_attrs.php
-rw-r--r-- 1 root root 25687 16 gen 02.00 res_basic.php
-rw-r--r-- 1 root root 15684 16 gen 02.00 res_certs.php
-rw-r--r-- 1 root root  4051 16 gen 02.00 res_contacts.php
-rw-r--r-- 1 root root  6897 16 gen 02.00 res_descriptions.php
-rw-r--r-- 1 root root 16183 16 gen 02.00 res_homeorgs.php
-rw-r--r-- 1 root root  5826 16 gen 02.00 res_keywords.php
-rw-r--r-- 1 root root 11711 16 gen 02.00 res_menu.php
drwxr-xr-x 6 root root    50 16 gen 02.00 resources
-rwxr-xr-x 1 root root 14268 16 gen 02.00 res_serviceLocations.php
-rw-r--r-- 1 root root  6622 16 gen 02.00 res_submit.php
-rw-r--r-- 1 root root  4976 16 gen 02.00 send_approval_reminder.php
-rw-r--r-- 1 root root 14047 16 gen 02.00 send_cert_expiration_notifications.php
-rw-r--r-- 1 root root  3256 16 gen 02.00 send_filter_reload_warnings.php
-rw-r--r-- 1 root root  5365 16 gen 02.00 send_invitation_reminder.php
-rw-r--r-- 1 root root  9147 16 gen 02.00 send_temp_resources_reminder.php
-rw-r--r-- 1 root root 10901 16 gen 02.00 send_update_notifications.php
-rwxr-xr-x 1 root root  3818 16 gen 02.00 send_validity_expiration_notification.php
-rw-r--r-- 1 root root  1558 16 gen 02.00 sms_callback.php
-rw-r--r-- 1 root root 10898 16 gen 02.00 transfer_adminrights.php
-rw-r--r-- 1 root root 22627 16 gen 02.00 update_interfederation_metadata.php
-rw-r--r-- 1 root root 12756 16 gen 02.00 update_setup_information.php
-rwxr-xr-x 1 root root  7424 16 gen 02.00 view_admin_matrix.php
-rwxr-xr-x 1 root root  5296 16 gen 02.00 view_attribute_matrix.php
-rwxr-xr-x 1 root root 11169 16 gen 02.00 view_attribute_use_audience.php
-rwxr-xr-x 1 root root 17783 16 gen 02.00 view_homeorg.php
-rwxr-xr-x 1 root root 36868 16 gen 02.00 view_resource.php
Cosa posso tentare ancora?

EDIT: Aggiungo la parte di ssl_access.log che compare all'apertura della pagina:

Codice: Seleziona tutto

"GET /opt/rr/ HTTP/1.1" 200 5829 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /resources/css/layout_slim.css HTTP/1.1" 404 644 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /resources/js/slim.js HTTP/1.1" 404 628 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /css/aairr.css HTTP/1.1" 404 773 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /resources/js/jquery/packed/jquery.js HTTP/1.1" 404 789 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /js/bsn.AutoSuggest_2.1.3_comp.js HTTP/1.1" 404 789 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /js/aairr.js HTTP/1.1" 404 773 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /js/wz_tooltip.js HTTP/1.1" 404 773 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /resources/js/slim.js HTTP/1.1" 404 628 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /js/bsn.AutoSuggest_2.1.3_comp.js HTTP/1.1" 404 644 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /js/aairr.js HTTP/1.1" 404 628 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /js/wz_tooltip.js HTTP/1.1" 404 628 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /opt/rr/resources/images/harmos/logo.gif HTTP/1.1" 304 229 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /Shibboleth.sso/Session HTTP/1.1" 200 442 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
"GET /images/AAITest-Login.gif HTTP/1.1" 404 628 "https://dsc.lab.xxxx.it/opt/rr/" "Mozilla/5.0 ..."
Spero possa aiutare...

Grazie!
Ultima modifica di marco.malavolti il martedì 17 gennaio 2012, 14:03, modificato 1 volta in totale.
Iron Bishop
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 624
Iscrizione: martedì 17 marzo 2009, 10:46
Contatti:

Re: [AIUTO] Problema forse banale...

Messaggio da Iron Bishop »

Mostra la parte di codice sorgente (output HTML) della pagina che richiama almeno uno di quei file, che nel log risultano missing.
* dovrebbero essere in /opt/rr/
* magari stai puntando a /

I permessi mostrano che stai lavorando usando l'utenza root. Non è consigliabile.
"/opt" è solo il nome di una cartella dentro htdocs, non stai esponendo sul web l'intera "/" di sistema, vero?
marco.malavolti
Prode Principiante
Messaggi: 63
Iscrizione: lunedì 29 ottobre 2007, 2:42
Località: Carpi

Re: [AIUTO] Problema forse banale...

Messaggio da marco.malavolti »

Iron Bishop ha scritto: Mostra la parte di codice sorgente (output HTML) della pagina che richiama almeno uno di quei file, che nel log risultano missing.
* dovrebbero essere in /opt/rr/
* magari stai puntando a /

I permessi mostrano che stai lavorando usando l'utenza root. Non è consigliabile.
"/opt" è solo il nome di una cartella dentro htdocs, non stai esponendo sul web l'intera "/" di sistema, vero?
questo è un pezzo di sorgente della pagina iniziale e sembra che non punti alle cartelle corrette.

La DocumentRoot di Apache è, e deve essere, /opt e l'applicazione è contenuta nella cartella /opt/rr:

Codice: Seleziona tutto

	<link rel="stylesheet" type="text/css" href="https://dsc.lab.xxxx.it/css/aairr.css" />
	<script type="text/javascript" src="https://dsc.lab.xxxx.it/resources/js/jquery/packed/jquery.js"></script>
	<script type="text/javascript" src="https://dsc.lab.xxxx.it/resources/js/slim.js"></script>
	<script type="text/javascript" src="https://dsc.lab.xxxx.it/js/bsn.AutoSuggest_2.1.3_comp.js" charset="utf-8"></script>
	<script type="text/javascript" src="https://www.google.com/jsapi"></script>
	<script language="JavaScript" src="https://dsc.lab.xxxx.it/js/aairr.js" type="text/javascript"></script>
Ultima modifica di marco.malavolti il martedì 17 gennaio 2012, 14:16, modificato 1 volta in totale.
Iron Bishop
Scoppiettante Seguace
Scoppiettante Seguace
Messaggi: 624
Iscrizione: martedì 17 marzo 2009, 10:46
Contatti:

Re: [AIUTO] Problema forse banale...

Messaggio da Iron Bishop »

Tutti gli URL che hai scritto sono sbagliati. Per evitare di incorrere nel problema, usa dei riferimenti relativi.

Riferimento assoluto (sbagliato)

Codice: Seleziona tutto

<link rel="stylesheet" type="text/css" href="https://dsc.lab.unimo.it/css/aairr.css" />
Riferimento assoluto (corretto)

Codice: Seleziona tutto

<link rel="stylesheet" type="text/css" href="https://dsc.lab.unimo.it/rr/css/aairr.css" />
Riferimento relativo (corretto)

Codice: Seleziona tutto

<link rel="stylesheet" type="text/css" href="css/aairr.css" />
PS: oppure cambia la document root a /opt/rr e non cambiare il codice sorgente.
Ultima modifica di Iron Bishop il martedì 17 gennaio 2012, 14:25, modificato 1 volta in totale.
marco.malavolti
Prode Principiante
Messaggi: 63
Iscrizione: lunedì 29 ottobre 2007, 2:42
Località: Carpi

Re: [AIUTO] Problema forse banale...

Messaggio da marco.malavolti »

Iron Bishop ha scritto: Tutti gli URL che hai scritto sono sbagliati. Per evitare di incorrere nel problema, usa dei riferimenti relativi.

Riferimento assoluto (sbagliato)

Codice: Seleziona tutto

<link rel="stylesheet" type="text/css" href="https://dsc.lab.unimo.it/css/aairr.css" />
Riferimento assoluto (corretto)

Codice: Seleziona tutto

<link rel="stylesheet" type="text/css" href="https://dsc.lab.unimo.it/rr/css/aairr.css" />
Riferimento relativo (corretto)

Codice: Seleziona tutto

<link rel="stylesheet" type="text/css" href="css/aairr.css" />
PS: oppure cambia la document root a /opt/rr e non cambiare il codice sorgente.
RISOLTO!

Era da impostare correttamente una variabile dentro la configurazione dell'applicazione!!!

I tuoi suggerimenti sono stati di notevole aiuto! Grazie!!!
Scrivi risposta

Ritorna a “Ubuntu su server”

Chi c’è in linea

Visualizzano questa sezione: 0 utenti iscritti e 2 ospiti