Answer the question
In order to leave comments, you need to log in
How to properly configure mod_rewrite for apache2 to work in Yii1?
Good afternoon!
Installed on debian apache + php + postgres
Registered hosts, added:
sudo a2enmod rewrite
sudo a2ensite hotel.conf
updatedb
locate mod_rewrite.so
cd /etc/apache2/mods-enabled
touch rewrite.load Registered
: in the above:
LoadModule rewrite_module /usr/lib /apache2/modules/mod_rewrite.so
000-default.conf :
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html
<Directory />
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
<Directory /var/www/hotel/public_html>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:80>
ServerName hotel
ServerAdmin [email protected]
ServerAlias www.hotel
DocumentRoot /var/www/hotel/public_html
CustomLog ${APACHE_LOG_DIR}/hotel.access.log combined
ErrorLog ${APACHE_LOG_DIR}/hotel.error.log
AssignUserID andrey andrey
DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
<Directory /var/www/example.com>
Options -Includes -Indexes -ExecCGI
</Directory>
</VirtualHost>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question