验证中...
Languages: PHP
Categories: Web开发技术
Latest update 2018-12-09 10:37
lnmp新建站点
Raw Copy
lnmp 站点
配置站点,多站点,重复1,2,3操作
1:建配置文件
touch /usr/local/nginx/conf/vhost/a.conf
2:a.conf(写入下面数据,root绝对网站路径,server_name域名)
server {
listen 80;
server_name www.test.com;
root /home/wwwroot/default/test;
index index.html index.php index.htm;
error_page 400 /errpage/400.html;
error_page 403 /errpage/403.html;
error_page 404 /errpage/404.html;
include enable-php-pathinfo.conf;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}
3:重启lnmp(lnmp restart)
就这么多了!!!

Comment list( 0 )

You need to Sign in for post a comment

Help Search