appnode不使用站點管理器,直接用nginx建站
阿新 • • 發佈:2018-11-19
配置
tp5環境原文
server { listen 80; server_name logo.lxx123.club; # 注意根目錄的許可權,否之403 root /vhs/www/phpzcool/public/; index index.html index.htm index.php; # 隱藏index.php location / { if (!-e $request_filename) { rewrite ^(.*)$ /index.php?s=/$1 last; break; } } location ~ ^/.+\.php { fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; # 預設的fpm埠 fastcgi_pass 127.0.0.1:9000; } }
html原文
server {
listen 80;
server_name love.lxx123.club;
root /vhs/www/lovetree;
index index.html index.htm;
}
一般php環境
server { listen 80; server_name vps.lxx123.club; root /vhs/www/dbninja; index index.html index.htm index.php; location ~ ^/.+\.php { fastcgi_index index.php; fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi_params; fastcgi_pass 127.0.0.1:9000; } }