Pagina 2 di 2
Re: htaccess file non ha nessun effetto[RISOLTO]
Inviato: sabato 3 maggio 2014, 18:56
da shivi_ubuntu
ho questi file nella cartella /etc/apache2/sites-enabled
000-default.conf
000-default.conf~
è questo è il contenuto del file 000-default.conf~
Codice: Seleziona tutto
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/laravel4/laravel/public/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options All
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 19:12
da Zoff
Innanzitutto fai un po' di pulizia, elimina tutti i file che terminano per ~ (anche in site-available), sono le copie di backup che crea gedit quando apri un file.
Poi controlla il file perché hai modificato la DocumentRoot ma non hai modificato il percorso del tag <Directory> che ne impostava la configurazione.
Si dovrebbe evitare di modificare "a sentimento" i file di configurazione.
Per cui immagino che risolverai cambiando
in:
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 19:46
da shivi_ubuntu
avevo gia modificato adesso il mio file è cosi
ho provato togliere anche DocumentRoot /var/www/ e poi ho riavviato apache ma ancora niente
Codice: Seleziona tutto
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options All
AllowOverride All
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:01
da shivi_ubuntu
non capisco una cosa se te dici che i file con il segno ~ sono le coppie allora perchè il loro contenuto è diverso il contenuto del file senza il segno ~ 000-default.conf
Codice: Seleziona tutto
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName http://localhost/
ServerAdmin webmaster@localhost
DocumentRoot /var/www
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
invece il contenuto del file con il segno ti ho postato spora prima con il segno ~
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:02
da Zoff
Gedit li salva periodicamente, quindi possono non essere sincronizzati
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:04
da shivi_ubuntu
allora dimmi quali dei due dove eliminare 000-default.conf oppure 000-default.conf~ ?
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:05
da Zoff
Non l'ho già scritto prima?
Quello che termina con ~
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:07
da shivi_ubuntu
se elimino 000-default.conf~ va eliminato tutto il suo contenuto e 000-default.conf ti ho appena postato dopo devo aggiungere qualcosa in questo file 000-default.conf !!!!
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:08
da Zoff
Ti ho già scritto tutto, non posso riscriverti ogni cosa due o tre volte
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:09
da shivi_ubuntu
fatto ho eliminato adesso ho solo questo file 000-default.conf con questo contenuto
Codice: Seleziona tutto
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName http://localhost/
ServerAdmin webmaster@localhost
DocumentRoot /var/www
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:15
da shivi_ubuntu
hiiiii brother everything is okkkkkk grazie zofffff dopo ho aggiunto adesso funziona
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
# Uncomment this directive is you want to see apache2's
# default start page (in /apache2-default) when you go to /
#RedirectMatch ^/$ /apache2-default/
</Directory>
Re: htaccess file non ha nessun effetto
Inviato: sabato 3 maggio 2014, 20:17
da Zoff
Ottimo, ricorda il risolto.
Anche nelle discussioni vecchie