nginx localhost 配置,开启目录浏览
来源:互联网 发布:禁忌的边界线知乎 编辑:程序博客网 时间:2024/05/01 08:28
以前使用Apache,有时候访问 localhost ,居然提示403 access die ,但有时候过几天又可以(没有修改过任何配置的情况下),很诡异,出现这样情况的时候不管是怎么修改配置都是提示403无权限!几率很低但一直无法解决。
换 nginx 后就没有再出现这样问题,autoindex 用的很爽。
配置文件 localhost.conf :
其中对 http://localhost/phpmyadmin/ alias别名到phpmyadmin!
server {listen 80;server_name localhost 127.0.0.1 "";root d:/localhost;index index.html index.htm index.php;autoindex on; autoindex_exact_size off;autoindex_localtime on;location /phpmyadmin {root d:/wamp/apps/phpmyadmin4.1.14;location ~ \.php$ {try_files $uri =404;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params; }}location ~ \.php$ {try_files $uri =404;fastcgi_pass 127.0.0.1:9000;fastcgi_index index.php;fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;include fastcgi_params; }#error_page 404 /404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location = /50x.html {root html;}location ~ /\.(ht|svn|git) {deny all;}}
0 0
- nginx localhost 配置,开启目录浏览
- nginx,apache开启文件目录浏览功能
- nginx,apache开启文件目录浏览功能
- linux下nginx开启目录浏览功能
- nginx开启目录浏览下载功能(autoindex)
- lnmp nginx开启目录浏览,解决中文乱码问题。
- Nginx学习历程_3_配置Nginx打开目录浏览功能
- nginx 目录浏览
- nginx localhost 配置 localhost.conf
- Nginx目录浏览功能(autoindex)
- Nginx浏览本地目录设置
- 启用Nginx目录浏览功能
- nginx启用浏览目录功能
- tomcat5.5下开启目录浏览功能
- Nginx 开启http目录下载
- wamp配置修改localhost目录
- Apache配置支持目录浏览
- Apache配置支持目录浏览 .
- eXtremeDB 数据库大小定义注意事项
- Iterator(3)--Interface
- uva 1368 - DNA Consensus String(字符串处理)
- 2014年心得体会
- Windows下安装OpenSSL及其使用
- nginx localhost 配置,开启目录浏览
- android 限制广播消息的接收者
- POJ 2540 Hotter Colder
- shell编程位置变量
- Motivated Word(3)
- C++BM算法
- TCC研究(2) 把C语言当作脚本,解释执行,并嵌入各类程序
- poj1019 Number Sequence
- 【BZOJ3209】花神的数论题 数位DP(我姿势不标准,但是可能更好写)