nginx and robots.txt 404 error
Hi all,
I have installed the nginx inEasyApache and enabled for some domain, but now I am getting an error.
404 for robots.txt and if i rename the file in rrobots.txt (with 2 r or other name) the new file can be accessed.
Any ideas?
-
Hey there! I'm not familiar with anything in nginx that would keep that file from being read normally. If you temporarily move/rename the .htaccess file as a test, does the file work properly? 0 -
tested with no htaccess, same situation. 0 -
ok. I have made an ticket. Will discuss this on the tickets. 0 -
Can you post the ticket number here so I can follow along and make sure this thread gets updated? 0 -
I just bumped in the same issue. The problem is in /etc/nginx/conf.d/server-includes/cpanel-static-locations.conf file, which is included for every vhost. It's using specific location matches, so it never goes the default "location /" to proxy to apache, so it ends up looking for the files (both /favicon.ico and /robots.txt) in the default document root. Quick and dirty fix - comment out the sections for both /favicon.ico and /robots.txt in /etc/nginx/conf.d/server-includes/cpanel-static-locations.conf. 0 -
Packages under EasyApache don't get assigned to a specific cPanel version as they are independent of the major release tier. Every package since ea-nginx-1.21.0-3.3.1 would have this fix applied. I checked my personal server just now and that is running ea-nginx-1.21.6-12.12.1 0 -
@alishy - Can you post the ticket number here so I can follow along? 0
Please sign in to leave a comment.
Comments
11 comments