首页 > 代码库 > nginx rewriter配置
nginx rewriter配置
rewriter配置
nginx.conf配置
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | server { listen 80; server_name 127.0.0.1; index index.php; root /usr/share/nginx/html; #rewrite ^/projects/BookLibrary2/public$ /projects/BookLibrary2/public/index.php; #include /usr/share/sidamingzhu.conf; location / { if (!-e $request_filename) { rewrite ^/(.*)$ /projects/BookLibrary2/ public /index.php last; } } location ~ \.php$ { #对.php文件调用php的fastcgi.exe处理 #root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } } |
fpm-php.conf需要配置監聽端口
?
1 | #加在fpm-php.conf最後一行<br>listen = 127.0.0.1:9000 |
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。