Difference between revisions of "Apache Server Setup"
Jump to navigation
Jump to search
(Created page with "Create a .htaccess file in website directory <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 12: | Line 12: | ||
file is located in the /etc/apache2 dir | file is located in the /etc/apache2 dir | ||
<Directory /var/www/> | <Directory /var/www/> | ||
AllowOverride All | |||
</Directory> | </Directory> | ||
To enable mod rewrite | To enable mod rewrite | ||
a2enmod rewrite | a2enmod rewrite | ||
== Edit .conf file== | |||
/etc/apache2/sites-available | |||
edit the corresponding domain config file. | |||
change AllowOverride None to: All |
Latest revision as of 15:13, 20 December 2018
Create a .htaccess file in website directory
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.html$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.html [L] </IfModule>
Edit the apache2.conf file
file is located in the /etc/apache2 dir
<Directory /var/www/> AllowOverride All </Directory>
To enable mod rewrite
a2enmod rewrite
Edit .conf file
/etc/apache2/sites-available edit the corresponding domain config file. change AllowOverride None to: All