nginx端口80没有工作

nginx端口80没有工作

本文介绍了Plesk nginx端口80没有工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个VPS服务器与Plesk在OVH,今天我没有重启服务器,页面停止工作在80端口。他们工作在7080端口,例如:moja-domena.pl:7080



我不知道可能发生了什么,因为我没有在服务器上做任何事情...



我的文件:

  #ATTENTION! 

#DO不会修改此文件,因为它自动生成,
#SO所有的更改将丢失下一个文件生成的时间。
#IF您需要应用自定义修改,在以下文件中执行以下操作:
#/ var / www / vhosts / system / moja-domena.pl / conf / vhost.conf

< VirtualHost 11.111.11.11:7080>
ServerNamemoja-domena.pl:80
ServerAliaswww.moja-domena.pl
ServerAliasipv4.moja-domena.pl
ServerAdminadmin @ 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>
SuexecUserGroupadminpsacln
< / IfModule>

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

< IfModule mod_sysenv.c>
SetSysEnv PP_VHOST_ID44fc2505-faf5-4066-9daa-53ea5e108cc0
< / IfModule>

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

别名/ plesk-stat/var/www/vhosts/system/moja-domena.pl/statistics
< Location / plesk-stat />
选项+索引
< /位置>
< Location / plesk-stat / logs />
需要有效用户
< / Location>
别名/ webstat /var/www/vhosts/system/moja-domena.pl/statistics/webstat
别名/ webstat-ssl /var/www/vhosts/system/moja-domena.pl/statistics / webstat-ssl
别名/ ftpstat /var/www/vhosts/system/moja-domena.pl/statistics/ftpstat
别名/ anon_ftpstat /var/www/vhosts/system/moja-domena.pl / statistics / anon_ftpstat
别名/ 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模块

< 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模块
FcgidMaxRequestLen 134217728
FcgidIOTimeout 480
< ; / IfModule>

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

< IfModule mod_perl.c>
< Files〜(\.pl $)>
SetHandler perl-script
PerlHandler ModPerl :: Registry
选项+ ExecCGI
允许从所有
PerlSendHeader在
< / Files>
< / IfModule>
< IfModule sapi_apache2.c>
php_admin_flag引擎

#一般设置
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_upload#性能设置
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
#附加指令

< / IfModule>

< IfModule mod_php5.c>
php_admin_flag引擎

#常规设置
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_upload#性能设置
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
#附加指令

< / IfModule>
< IfModule mod_python.c>
< Files〜(\.py $)>
SetHandler python程序
PythonHandler mod_python.cgihandler
< / Files>
< / IfModule>
< IfModule mod_fcgid.c>
< Files〜(\.fcgi $)>
SetHandler fcgid-script
选项+ ExecCGI
< / Files>
< / IfModule>

选项 - 包含+ ExecCGI

< / Directory>

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

< IfModule sapi_apache2.c>
php_admin_flag引擎off
< / IfModule>

< IfModule mod_php5.c>
php_admin_flag引擎off
< / IfModule>

< / Directory>

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

< Directory/var/www/vhosts/system/moja-domena.pl/statistics\">
AuthType Basic
AuthName域统计信息
AuthUserFile/var/www/vhosts/system/moja-domena.pl/pd/d..httpdocs@plesk-stat
要求有效用户
< / 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:允许您将Apache绑定到特定的IP地址和/或
#除了默认。另请参见< VirtualHost>
#指令。

#将其更改为侦听特定的IP地址,如下所示
#防止Apache从所有绑定的IP地址(0.0.0.0)中剔除

#Listen 12.34.56.78:80
听7080
[...]

/ etc / sysconfig / iptables

 #由system-config-firewall 
编写的防火墙配置#手动定制此不建议使用文件。
* filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT - m状态 - 状态ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p ipv6-icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state - -state NEW -mtcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -mcp-tcp -dport 80 -j ACCEPT
##打开443端口即HTTPS
-A INPUT -m状态--state NEW -mcp-tcp --dport 443 -j ACCEPT
COMMIT

帮助我:)谢谢

解决方案

我解决了问题!



在控制台中:

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

Thx


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 "[email protected]"
        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

解决方案

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

这篇关于Plesk nginx端口80没有工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 02:22