Nginx虚拟主机配置
2017-07-12 22:05
429 查看
以www.youraccount.me项目为例
server {
charset utf-8;
client_max_body_size 128M;
listen 80;
server_name www.youraccount.me;
root /home/wwwroot/youraccount/advanced/frontend/web;
#root /home/wwwroot/;
index index.php;
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php;
}
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_param RUN_MODE 'production';
}
location ~ /\.(ht|svn|git) {
deny all;
}
location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css|woff|woff2)$
{
}
access_log /home/wwwlogs/access_inter.com.log;
error_log /home/wwwlogs/error_inter.com.log debug;
}
server {
charset utf-8;
client_max_body_size 128M;
listen 80;
server_name www.youraccount.me;
root /home/wwwroot/youraccount/advanced/frontend/web;
#root /home/wwwroot/;
index index.php;
location / {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php;
}
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
fastcgi_param RUN_MODE 'production';
}
location ~ /\.(ht|svn|git) {
deny all;
}
location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css|woff|woff2)$
{
}
access_log /home/wwwlogs/access_inter.com.log;
error_log /home/wwwlogs/error_inter.com.log debug;
}
相关文章推荐
- 第四百零二节,Django+Xadmin打造上线标准的在线教育平台—生产环境部署,uwsgi安装和启动,nginx的安装与启动,uwsgi与nginx的配置文件+虚拟主机配置
- CentOS 6.1 环境中部署nginx、php(包括fastcgi)、虚拟主机配置
- nginx-基于IP的虚拟主机配置
- nginx虚拟主机配置
- Nginx虚拟主机配置
- Nginx实现虚拟主机配置
- nginx基于域名的虚拟主机配置(读书实验笔记)
- nginx 的虚拟主机配置
- nginx 多域名虚拟主机配置 (nginx如何绑定多个域名)
- nginx 基于域名的虚拟主机配置
- Linux笔记(66)——nginx虚拟主机配置
- nginx多虚拟主机配置
- Nginx 反向代理 负载均衡 虚拟主机配置
- nginx虚拟主机配置
- Linux上Nginx如何添加多个虚拟主机配置
- nginx 的虚拟主机配置
- nginx/windows: nginx多虚拟主机配置
- nginx基于端口的虚拟主机配置
- Nginx虚拟主机配置
- Nginx 虚拟主机配置