I followed this tutorial to configure the server for running 2 Wordpress installations: https://www.digitalocean.com/community/tutorials/how-to-configure-single-and-multiple-wordpress-site-settings-with-nginx
I have configure it with nginx, hhvm, ubuntu 14.04 and mysql. All was running smooth with the first Wordpress single installation.
After that, I tried to set up a second virtual block to migrate there my multisite with subdomains and there is where the trouble started.
I imported the database with the same database name and user than in the previous hosting (Hostgator), and copied the whole wordpress installation into a new folder at var/www. But I get the “404 Not Found nginx/1.6.2” screen.
What can be wrong?
My server block for the new configuration is:
server {
server_name *.thecrazytravel.com;
root /var/www/thecrazytravel;
access_log /var/log/nginx/thecrazytravel.com.access.log;
error_log /var/log/nginx/thecrazytravel.com.error.log;
include global/common.conf;
include global/wordpress.conf;
include hhvm.conf;
}
It is enabled, the same than the first block.
I changed the DNS in my domain to point to digitalocean’s nameservers but I reverted it after noticing the error. I am testing now pointing from my computer to digitalocean server with my local host file (just in case you check it out and it works).
My DNS configuration on Digitalocean is:
http://i.imgur.com/7qMEjLX.png I tried as well with the wild card (*) as CNAME but it didn’t make any difference.
Is it something wrong on the nginx configuration? Or a permissions problem?
I assigned var/www/thecrazytavel to the same user than var/www/workraw (the other block) and tried with the same permits and nothing changed.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I solved it. I still have to polish it, but it is working. I just rewrote most of it instead of using the system of the tutorial I followed.
My code at the moment is:
It could be improved, but it is running now. I hope it helps somebody out there with the same problem.