linux 中安装nginx 的虚拟主机
来源:互联网 发布:室内手机手绘软件 编辑:程序博客网 时间:2024/06/05 18:53
直接将一下代码粘贴到nginx的配置文件的
#location ~ /\.ht {
# deny all;
#}
}
的下面
server {
listen 80;
server_name 域名;
location / {
root 根目录;
index index.html index.htm index.php;
}
location ~ \.php$ {
root 根目录;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#location ~ /.ht {
# deny all;
#}
#location ~ /\.ht {
# deny all;
#}
}
的下面
server {
listen 80;
server_name 域名;
location / {
root 根目录;
index index.html index.htm index.php;
}
location ~ \.php$ {
root 根目录;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
#location ~ /.ht {
# deny all;
#}
}
之后重启nginx 重启 php-fpm
0 0
- linux 中安装nginx 的虚拟主机
- linux中nginx的安装
- Linux中Nginx的安装
- Linux中Nginx的安装
- linux(centos)下nginx虚拟主机的配置
- Linux上nginx安装配置(配置虚拟主机,静态资源)
- Linux中安装Nginx
- linux中安装nginx
- Linux中安装nginx
- Linux中安装nginx
- Nginx的虚拟主机配置
- nginx虚拟主机的配置
- Nginx虚拟主机的配置
- 配置Nginx的虚拟主机
- nginx虚拟主机的配置
- NGINX虚拟主机的创立
- Nginx的虚拟主机配置
- nginx虚拟主机的配置
- Java语言程序设计基础篇原书第十版第二章编程练习题答案
- jsp(out对象可以向html页面中输出)
- 如何在wampserver添加多个本地网站
- android studio 修改包名
- Android 推荐引入的库与基本使用
- linux 中安装nginx 的虚拟主机
- 基于Red5的流媒体实时视频系统的设计与实现
- AAC raw包增加ADTS头
- Parcelable、序列化
- Kali 2016版本 open-vm-tools 安装
- super关键字的使用
- jQuery开发插件的两个方法
- Linux知识笔记----文件属性
- swift中UITableView的使用(分组功能,类似于QQ群组)