- edit site conf (vim /etc/apache2/sites-available/pr.site.org.conf)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<VirtualHost pr.site.org:80> ServerName pr.site.org ServerAdmin webmaster@localhost DocumentRoot /var/www/pr.site.org # !-- add this section <Directory /var/www/pr.site.org> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> # !-- ErrorLog ${APACHE_LOG_DIR}/pr_error.log CustomLog ${APACHE_LOG_DIR}/pr_access.log combined </VirtualHost> |
- enable apache2 rewrite module
1 |
a2enmod rewrite |
- restart apache2 service
1 |
service apache2 restart |
Ref.
[1] Victor Hung’s Diary: 「教學」解決 WordPress 固定網址設定 404 錯誤
[2] DigitalOcean: WordPress permalinks tried everything