• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

"html" sites not working after turning nginx on

sebas

Basic Pleskian
Today I turned on nginx and there is something strange going on.

The sites that are php based either "plain" php or CMS (joomla, drupal, wordpress) are working ok.

But the sites that are just regular html files are showing empty. The response is empty, there are just headers (http) and that is it.

That is using regular URLs (port 80) if one tries accessing the site "directly" through apache (port 7080) then everything is fine.

I started ngixn using:
Home>Tools & Settings>Reverse Proxy Server (nginx)>start

But I also did
[root@www httpdocs]# /usr/local/psa/admin/bin/httpdmng --reconfigure-all
[root@www httpdocs]# service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@www httpdocs]# service nginx restart
Stopping nginx: [ OK ]
Starting nginx: [ OK ]

and a reboot without luck.

This is what I have:
OS Red Hat Enterprise Linux Server 6.3 (Santiago)
Panel version 11.0.9 Update #10, last updated at Aug 23, 2012 12:09 PM

Thanks for your help.
 
What do you have in for any of the html sites that is failing to open:

/var/www/vhosts/domain.com/conf/last_nginx.conf
 
This is the content of the file:

What do you have in for any of the html sites that is failing to open:

/var/www/vhosts/domain.com/conf/last_nginx.conf

-------- Begin file -------
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.


server {
listen 74.86.16.34:443 ssl;

server_name tbsmex.com;
server_name www.tbsmex.com;
server_name ipv4.tbsmex.com;
# aliases
server_name tbsmex.com.mx;
server_name www.tbsmex.com.mx;

ssl_certificate /usr/local/psa/var/certificates/cert-KLglrv;
ssl_certificate_key /usr/local/psa/var/certificates/cert-KLglrv;
ssl_client_certificate /usr/local/psa/var/certificates/cert-xBvVnT;
ssl_session_timeout 5m;

ssl_protocols SSLv2 SSLv3 TLSv1;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;

client_max_body_size 128m;

location / {
proxy_pass https://127.0.0.1:443;
proxy_redirect http://tbsmex.com:443/ http://tbsmex.com/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Accel-Internal /internal-nginx-static-location;
access_log off;
}

location /internal-nginx-static-location/ {
alias /var/www/vhosts/tbsmex.com/httpsdocs/;
access_log /var/www/vhosts/tbsmex.com/statistics/logs/proxy_access_ssl_log;
add_header X-Powered-By PleskLin;
internal;
}
}



server {
listen 74.86.16.34:80;

server_name tbsmex.com;
server_name www.tbsmex.com;
server_name ipv4.tbsmex.com;
# aliases
server_name tbsmex.com.mx;
server_name www.tbsmex.com.mx;


client_max_body_size 128m;

location / {
proxy_pass http://127.0.0.1:80;
proxy_redirect http://tbsmex.com:80/ http://tbsmex.com/;

proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Accel-Internal /internal-nginx-static-location;
access_log off;
}

location /internal-nginx-static-location/ {
alias /var/www/vhosts/tbsmex.com/httpdocs/;
access_log /var/www/vhosts/tbsmex.com/statistics/logs/proxy_access_log;
add_header X-Powered-By PleskLin;
internal;
}
}
-------- End file -------

Thanks in advance,
 
From what I see, you have a problem within that last_nginx file. Did you change / modify the default template file ? If you didnt, please delete it and try re-generating vhosts.
 
re-generating vhost makes no difference.

From what I see, you have a problem within that last_nginx file. Did you change / modify the default template file ? If you didnt, please delete it and try re-generating vhosts.

I have not touched the default template file.

I deleted all of them, and then reenabled nginx, and the problem is still there.

PHP sites work great, plain html sites look empty.

Thanks for you ideas.
 
Solution

The server had been using mod_pagespeed once it was disabled plain html sites work again.
 
Back
Top