安装lnmp,这个该如何添加进去?为什么我试了导致mysql服务无法重新启动
http://www.cnblogs.com/cuxnil/archive/2013/01/06/2847118.html
我是按照上面这个教程做,但是安装到这一步
4.1、修改nginx配置文件
# vi /etc/nginx/nginx.conf
更改网站的根目录,添加php默认文件:
location / { root /usr/share/nginx/html; index index.php index.html index.htm; #启用伪静态规则,可以支持自定义链接和日志别名 if (!-e $request_filename) { rewrite ^/(.+)$ /index.php last; } }当我在nginx。conf中输入上面的内容,导致nginx服务无法重新启动了。请问上面的代码要怎么写?
我默认的nginx。conf是这样的 # For more information on configuration, see: # * Official English Documentation: http://nginx.org/en/docs/ # * Official Russian Documentation: http://nginx.org/ru/docs/ user nginx; worker_processes 1; error_log /var/log/nginx/error.log; #error_log /var/log/nginx/error.log notice; #error_log /var/log/nginx/error.log info; pid /var/run/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; # Load config files from the /etc/nginx/conf.d directory # The default server is in conf.d/default.conf include /etc/nginx/conf.d/*.conf; }
nginx: [emerg] unknown directive "location" in /etc/nginx/nginx.conf:44
44行location这段~
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。