I’m trying to setup a wordpress site on my server that also hosts another website. I can only get the wordpress site to work with the web address blog.murmilosoftware.com/wp
.
I want to be able to simply access it from blog.murmilosoftware.com
.
The problem is when I type blog.murmilosoftware.com
in right now it displays the same page that is available from murmilosoftware.com
.
I have attached both of the sites-available config files from /etc/apache2/sites-available
.
blog.murmillosoftware.com.conf
Alias /wp/wp-content /var/lib/wordpress/wp-content
Alias /wp /usr/share/wordpress
<Directory /usr/share/wordpress>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
</Directory>
<Directory /var/lib/wordpress/wp-content>
Options FollowSymLinks
Require all granted
</Directory>
murmillosoftware.com.conf
<VirtualHost *:80>
ServerAdmin erik@murmillosoftware.com
ServerName murmillosoftware.com
ServerAlias www.murmillosoftware.com
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Forgot to restart my apache service. It is working now.
Do you notice the
<VirtualHost *:80>
in yourmurmillosoftware.com.conf
file? That is called the Virtual Host configuration. In your currentblog.murmillosoftware.com.conf
, all you’re doing is creating an alias to/wp
path, which is why you’re able to browse wordpress there.Update your
blog.murmillosoftware.com.conf
as follows (might be buggy, keep checking server logs):