Plesk nginx port 80 no working

2019-06-05 16:13发布

问题:

I have a VPS server with Plesk at OVH and today I did restart the server and page stopped working on port 80. They work on port 7080 for example: moja-domena.pl:7080

I do not know what could have happened because I did not do anything on the server ...

My files:

#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.
#IF YOU REQUIRE TO APPLY CUSTOM MODIFICATIONS, PERFORM THEM IN THE FOLLOWING FILES:
#/var/www/vhosts/system/moja-domena.pl/conf/vhost.conf

    <VirtualHost 11.111.11.11:7080 >
        ServerName "moja-domena.pl:80"
        ServerAlias "www.moja-domena.pl"
        ServerAlias "ipv4.moja-domena.pl"
        ServerAdmin "admin@moja-domena.pl"
        UseCanonicalName Off

        DocumentRoot "/var/www/vhosts/vpsXXX.ovh.net/moja-domena.pl"
        CustomLog /var/www/vhosts/system/moja-domena.pl/logs/access_log plesklog
        ErrorLog "/var/www/vhosts/system/moja-domena.pl/logs/error_log"

        <IfModule mod_suexec.c>
            SuexecUserGroup "admin" "psacln"
        </IfModule>

        <IfModule mod_userdir.c>
            UserDir "/var/www/vhosts/vpsXXX.ovh.net/web_users"
        </IfModule>

        <IfModule mod_sysenv.c>
            SetSysEnv PP_VHOST_ID "44fc2505-faf5-4066-9daa-53ea5e108cc0"
        </IfModule>

        ScriptAlias "/cgi-bin/" "/var/www/vhosts/vpsXXX.ovh.net/moja-domena.pl/cgi-bin/"

        Alias "/plesk-stat" "/var/www/vhosts/system/moja-domena.pl/statistics"
        <Location  /plesk-stat/>
            Options +Indexes
        </Location>
        <Location  /plesk-stat/logs/>
            Require valid-user
        </Location>
        Alias /webstat /var/www/vhosts/system/moja-domena.pl/statistics/webstat
        Alias /webstat-ssl /var/www/vhosts/system/moja-domena.pl/statistics/webstat-ssl
        Alias /ftpstat /var/www/vhosts/system/moja-domena.pl/statistics/ftpstat
        Alias /anon_ftpstat /var/www/vhosts/system/moja-domena.pl/statistics/anon_ftpstat
        Alias /awstats-icon /var/www/html/awstats/icon

        <IfModule mod_ssl.c>
            SSLEngine off
        </IfModule>

        SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/moja-domena.pl/etc/php.ini
        SetEnv PP_CUSTOM_PHP_CGI_INDEX module

        <IfModule mod_fcgid.c>
            FcgidInitialEnv PP_CUSTOM_PHP_INI /var/www/vhosts/system/moja-domena.pl/etc/php.ini
            FcgidInitialEnv PP_CUSTOM_PHP_CGI_INDEX module
            FcgidMaxRequestLen 134217728
            FcgidIOTimeout 480
        </IfModule>

        TimeOut 480
        <Directory /var/www/vhosts/vpsXXX.ovh.net/moja-domena.pl>

            <IfModule mod_perl.c>
                <Files ~ (\.pl$)>
                    SetHandler perl-script
                    PerlHandler ModPerl::Registry
                    Options +ExecCGI
                    allow from all
                    PerlSendHeader On
                </Files>
            </IfModule>
            <IfModule sapi_apache2.c>
                php_admin_flag engine on

                # General settings
                php_admin_flag safe_mode off
                php_admin_value open_basedir "/var/www/vhosts/vpsXXX.ovh.net/:/tmp/"
                php_admin_value error_reporting 32759
                php_admin_flag display_errors off
                php_admin_flag allow_url_fopen on
                php_admin_flag file_uploads on
                # Performance settings
                php_admin_value memory_limit 2G
                php_admin_value max_execution_time 480
                php_admin_value post_max_size 8M
                php_admin_value upload_max_filesize 8M
                # Additional directives

            </IfModule>

            <IfModule mod_php5.c>
                php_admin_flag engine on

                # General settings
                php_admin_flag safe_mode off
                php_admin_value open_basedir "/var/www/vhosts/vpsXXX.ovh.net/:/tmp/"
                php_admin_value error_reporting 32759
                php_admin_flag display_errors off
                php_admin_flag allow_url_fopen on
                php_admin_flag file_uploads on
                # Performance settings
                php_admin_value memory_limit 2G
                php_admin_value max_execution_time 480
                php_admin_value post_max_size 8M
                php_admin_value upload_max_filesize 8M
                # Additional directives

            </IfModule>
            <IfModule mod_python.c>
                <Files ~ (\.py$)>
                    SetHandler python-program
                    PythonHandler mod_python.cgihandler
                </Files>
            </IfModule>
            <IfModule mod_fcgid.c>
                <Files ~ (\.fcgi$)>
                    SetHandler fcgid-script
                    Options +ExecCGI
                </Files>
            </IfModule>

            Options -Includes +ExecCGI

        </Directory>

        <Directory /var/www/vhosts/vpsXXX.ovh.net/web_users>

            <IfModule sapi_apache2.c>
                php_admin_flag engine off
            </IfModule>

            <IfModule mod_php5.c>
                php_admin_flag engine off
            </IfModule>

        </Directory>

        <Directory /var/www/vhosts/moja-domena.pl>
            Options +FollowSymLinks
        </Directory>

        <Directory "/var/www/vhosts/system/moja-domena.pl/statistics">
            AuthType Basic
            AuthName "Domain statistics"
            AuthUserFile "/var/www/vhosts/system/moja-domena.pl/pd/d..httpdocs@plesk-stat"
            require valid-user
        </Directory>

        <IfModule mod_rewrite.c>
            RewriteEngine On
            RewriteCond %{HTTP_HOST} ^moja-domena.pl$ [NC]
            RewriteRule ^(.*)$ http://www.moja-domena.pl$1 [L,R=301]
        </IfModule>

        <IfModule mod_security2.c>
        </IfModule>

    </VirtualHost>

/etc/httpd/conf/httpd.conf:

[...]
#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80
Listen 7080
[...]

/etc/sysconfig/iptables

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p ipv6-icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
## Open 443 port i.e. HTTPS
-A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
COMMIT

Help me :) Thanks

回答1:

I solved the problem!

in console:

[root@vpsxxxx ~]# /usr/local/psa/admin/bin/nginxmng --enable
[root@vpsxxxx ~]# service nginx restart
Starting nginx:                                            [  OK  ]
[root@vpsxxxx ~]#

Thx