1
如果我連接www.my-hsot.com
,則始終輸出'Hello!' Text ..無法修改nginx index.html文件
但是我的index.html文件內容沒有任何內容。我想只是空白頁.. 我如何修改默認索引文件?
這裏是我的默認配置:
server {
listen 80;
root /home/me;
index index.php index.html index.htm;
server_name www.my-hsot.com;
location/{
try_files $uri $uri/ /index.php?$request_uri;
}
location /.well-known {
root /home/me/well-known;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_keep_conn on;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
}
}
這是nginx的默認索引文件(路徑:/usr/share/nginx/html/index.html)is:
<!DOCTYPE html>
<html>
<head>
<title>Welcome to nginx!</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to nginx!</h1>
<p>If you see this page, the nginx web server is successfully installed and
working. Further configuration is required.</p>
<p>For online documentation and support please refer to
<a href="http://nginx.org/">nginx.org</a>.<br/>
Commercial support is available at
<a href="http://nginx.com/">nginx.com</a>.</p>
<p><em>Thank you for using nginx.</em></p>
</body>
</html>
'/家庭/ me'是不存在的... –