重新启动我的vps"欢迎使用nginx!"现在正在我的网站上显示。对于索引页面,以及其他页面。是否有因重启而可能发生变化的事情?
来自nginx / sites-enabled / default的一些信息。
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6
root /usr/share/nginx/www;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
location /doc/ {
alias /usr/share/doc/;
autoindex on;
allow 127.0.0.1;
deny all;
}
# Only for nginx-naxsi : process denied requests
#location /RequestDenied {
# For example, return an error code
#return 418;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
答案 0 :(得分:0)
如果要在系统引导后停止加载服务(Nginx),请根据Linux版本使用以下其中一项:
admin@ubuntu:$ sudo chkconfig nginx off ==> Ubuntu before 12 versions
admin@ubuntu:$ sysv-rc-conf nginx off ==> (alternative for new ubuntu 12+, but you have to install it: sudo apt-get install sysv-rc-conf)