Welcome! Log In Create A New Profile

Advanced

Domain root not working

Posted by droidly 
Domain root not working
October 19, 2012 03:48AM
mydomain.com is running with nginx1.2, php-fpm, apc on an ubuntu server (medium - amazon ec2). I have been tweaking my server for past 6 months, however a problem started occurring since day before yesterday.

I am unable to resolve the root for www.mydomain.com, or mydomain.com. It takes 3 minutes to receive a broken page with all the links on the page converted to the local ip (10.x.x.x) However, any other url, www.mydomain.com/a, or mydomain.com/a, or www.mydomain.com/a.php etc. resolve perfectly and with the characteristic nginx speed (i am a big fan)! Even www.mydomain.com/index.php resolves perfectly which is basically the same server root i.e www.mydomain.com. So it seems that requests can not be resolved only if passed without any url at the end.

I came up with the following three possibilities why this could be happening:
1- incorrect host setup - i might be passing incorrect host information in some setting i.e in php-fpm.conf, php.ini, or nginx.conf or in ubuntu under hosts, or hostname.conf etc.
2- incorrect index setup - i might be passing incorrect index types in nginx.conf or php-fpm.conf
3- anything is possible :(

Most importantly, this problem goes away, if I stop using the "server_name" directive in nginx.conf. So an un-named nginx server block leads to normal operation, but the moment I put in the server_name directive to www.mydomain.com or mydomain.com, then again the domain root becomes unreachable.

This has been driving me crazy for the past two days. Ceaseless googling has been of little help, as it is probably a configuration mis-directive. I humbly bend down, before my computer overlords! I have attached necessary files, ask for anything else I should attach. Please help!
Attachments:
open | download - nginx.conf (2.8 KB)
open | download - php-fpm.conf (4 KB)
open | download - www-php-fpm.conf (8.5 KB)
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 167
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready