Hey guys, I'm having problems. I'm a little new to nginx, and I've set it up on my server. I redirected my domains to it, and I'm getting a "Server not found"
The site *does* work when I just enter in the IP, since I have the default server set up with a localhost that goes to /home/mainsite/public_html/
So when I go to: http://100.100.100.100/folder/file.php, everything works.
However, the nameserver I'm using is supposed to be going to a different folder than /home/mainsite/public_html/. It needs to go to /home/gamesite/public_html/
This is my /etc/nginx/sites-enabled/default:
server {
listen 80 default;
server_name localhost;
access_log /var/log/nginx/localhost.access.log;
location / {
root /home/mainsite/public_html;
index index.php index.html;
}
# MORE BELOW
}
This is my /etc/nginx/sites-enabled/gamesite:
server {
listen 80; ## listen for ipv4
server_name *.gamesite.com;
access_log /var/log/nginx/flariusgames.com.access.log;
error_log /var/log/nginx/flariusgames.com.error.log;
location / {
root /home/gamesite/public_html/;
index index.php index.html;
}
# MOREBELOW
}
I've changed the server name to gamesite.com, but no matter what, I run into problems. Another strange thing is that when I go to http://gamesite.com, it loads up www.gamesite.com, so I don't know if this is a DNS issure or something. And if it is, I don't really know how to do that...
Can someone please help?