nginx如何配置虚拟主机
2017-07-18 21:35
375 查看
/usr/local/nginx/conf/vhost
precision.conf --- 新建文件名称
----极路由---也要配置什么----》
级路由----智能插件----去往插件市场----自定义host---
或者:/etc/hosts 在文件中配置;~~~~~!!!
sudo vim /etc/hosts
注意:linux 1.3的好像用不了require函数,会报错;
服务器重启:
sudo nginx -s stop
sudo nginx
---/etc/ host 文件打开处理---~~~~worked~~~
配置PDO---链接数据库:---在mysql命令行操作
grant all on *.* to 用户名@'%' identified by '密码';
flush privileges
precision.conf --- 新建文件名称
server { listen 80; #listen [::]:80 default_server ipv6only=on; server_name local.presion.caomall.net; index index.html index.htm index.php; root /home/wwwroot/default/precision/Public; #error_page 404 /404.html; include enable-php-pathinfo.conf; location /nginx_status { stub_status on; access_log off; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /\. { deny all; } access_log /home/wwwlogs/access.log; }http://hiwifi.com/login_web.html?from_index_1500435362437
----极路由---也要配置什么----》
级路由----智能插件----去往插件市场----自定义host---
或者:/etc/hosts 在文件中配置;~~~~~!!!
sudo vim /etc/hosts
注意:linux 1.3的好像用不了require函数,会报错;
服务器重启:
sudo nginx -s stop
sudo nginx
---/etc/ host 文件打开处理---~~~~worked~~~
配置PDO---链接数据库:---在mysql命令行操作
grant all on *.* to 用户名@'%' identified by '密码';
flush privileges
相关文章推荐
- Nginx如何配置虚拟主机?
- linux上nginx如何添加多个虚拟主机配置
- Linux上Nginx如何添加多个虚拟主机配置
- 如何在已有网站的服务器上面,通过nginx配置虚拟主机来达到多个应用使用同一个服务器的效果
- nginx如何配置虚拟主机
- Nginx虚拟主机配置教程【3】
- nginx系列-03-虚拟主机的配置
- lnmp下 nginx 配置虚拟主机
- nginx虚拟主机的配置
- Nginx虚拟主机配置教程
- 如何配置apache一个ip多域名的虚拟主机?
- 【Nginx系列】Nginx虚拟主机的配置核日志管理
- nginx的配置、虚拟主机、负载均衡和反向代理
- Nginx安装配置(含PHP支持、虚拟主机、反向代理负载均衡)
- nginx服务器,fastcgi模式,添加虚拟主机(多站点)配置
- Nginx的虚拟主机配置文件
- ubuntu16.04 nginx1.10.3 配置虚拟主机
- 配置nginx状态信息虚拟主机
- nginx配置多个虚拟主机,只有其中某个有作用
- nginx学习笔记4 nginx的配置文件2 虚拟主机的配置