URLServerAlias on WordPress

by

in

WordPress server would only respond to specific domain name. If additional domain or hostname is needed, edit the wordpress.conf file in /etc/apache2/sites-available folder.

<VirtualHost *:80>
ServerName yourdomain.com
DocumentRoot /var/www/html/wordpress
ServerAlias www.yourdomain.com

<Directory /var/www/html/wordpress>
AllowOverride All
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *