AMH 社区首页
AMH社区 - 开放自由有价值的社区
[求助帖] 求EduSoho在AMH面板下的完整无误伪静态Rewrite方案 |
|
---|---|
dianshang8 |
dianshang8 发表于 2015-11-30 00:50:01
本帖最后由 dianshang8 于 2015-11-30 00:51 编辑
现有环境:LNMP 所装系统:EduSoho 现况:EduSoho程序已成功安装,但是页面的URL规则为“http://www.xxx.com/web/app.php/”(实际上应该为:http://www.xxx.com/) 需求: 现在需要做一下Rewrite,伪静态规则重写,使URL规则正常,实现“http://www.xxx.com/” 求各路大神给予解决办法,感谢!
点赞,加油! (5.56分)
2015-11-30 00:50:01 1
|
amysql |
edusoho主机配置,改成你相应的环境与域名。
server { listen 80; #listen end server_name 域名.com; #server_name end index index.html index.htm index.php; #index end set $subdomain ''; root /home/wwwroot/环境名/domain/域名.com/web/web$subdomain; include /home/wwwroot/环境名/rewrite/amh.conf; #rewrite end #error_page error_page 400 /ErrorPages/400.html; error_page 403 /ErrorPages/403.html; error_page 404 /ErrorPages/404.html; error_page 502 /ErrorPages/502.html; location ~ /ErrorPages/(400|401|403|404|405|502|503)\.html$ { root /home/wwwroot/环境名/domain/域名.com/web/web; } location / { index app.php; try_files $uri @rewriteapp; } location @rewriteapp { rewrite ^(.*)$ /app.php/$1 last; } location ~ ^/udisk { internal; root /home/wwwroot/环境名/domain/域名.com/web/app/data/; } location ~ ^/(app|app_dev)\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_pass unix:/tmp/php-cgi-环境名-域名.com.sock; fastcgi_index index.php; include fcgi.conf; fastcgi_param DOCUMENT_ROOT /home/wwwroot/环境名/domain/域名.com/web/web$subdomain; fastcgi_param SCRIPT_FILENAME /home/wwwroot/环境名/domain/域名.com/web/web$subdomain$fastcgi_script_name; include fastcgi_params; fastcgi_param HTTPS off; fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect; fastcgi_param HTTP_X-Accel-Mapping /udisk=/home/wwwroot/环境名/domain/域名.com/web/app/data/udisk; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; fastcgi_buffer_size 128k; fastcgi_buffers 8 128k; } location ~ ^/files/.*\.(php|php5)$ { deny all; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.*)$; fastcgi_pass unix:/tmp/php-cgi-环境名-域名.com.sock; fastcgi_index index.php; include fcgi.conf; fastcgi_param DOCUMENT_ROOT /home/wwwroot/环境名/domain/域名.com/web/web$subdomain; fastcgi_param SCRIPT_FILENAME /home/wwwroot/环境名/domain/域名.com/web/web$subdomain$fastcgi_script_name; fastcgi_param HTTPS off; include fastcgi_params; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp3|wma)$ { expires 30d; } location ~ .*\.(js|css)$ { expires 12h; } access_log off; #access_log end error_log /dev/null; #error_log end }
回复
2015-12-15 12:39:46 2
AMH面板 - 好用高效低占用、安全可靠极稳定 |
adrock |
谢谢老大遇到同样的问题,万分感谢啊
回复
2016-02-01 23:49:38 3
|
adrock |
回复
2016-02-02 00:01:22 4
|
adrock |
您好,请问您这问题解决没有
回复
2016-02-02 09:23:33 5
|
amysql |
回复
2016-02-02 16:24:44 6
|