1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

"html" sites not working after turning nginx on

Discussion in 'Plesk 11.x for Linux' started by sebas, Aug 31, 2012.

  1. sebas

    sebas Basic Pleskian

    25
    90%
    Joined:
    Nov 14, 2003
    Messages:
    37
    Likes Received:
    2
    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.
     
  2. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    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
     
  3. sebas

    sebas Basic Pleskian

    25
    90%
    Joined:
    Nov 14, 2003
    Messages:
    37
    Likes Received:
    2
    This is the content of the file:

    -------- 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,
     
  4. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    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.
     
  5. sebas

    sebas Basic Pleskian

    25
    90%
    Joined:
    Nov 14, 2003
    Messages:
    37
    Likes Received:
    2
    re-generating vhost makes no difference.

    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.
     
  6. sebas

    sebas Basic Pleskian

    25
    90%
    Joined:
    Nov 14, 2003
    Messages:
    37
    Likes Received:
    2
    Solution

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

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    Alright, thanks for letting us know and also sharing that information.
     
Loading...