- 积分
- 4
- 威望
-
- 金钱
-
- 注册时间
- 2010-5-29
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
请各位成功设置nginx伪静态的朋友,指点一下.无论如何设置都不能在网站前台实现.按着帖子上面的方法试过N次了,还没有没有设置好.望走过看过的朋友留意,谢谢!- server
- {
- listen 80;
- server_name www.esinomarr.com;
- index index.html index.htm index.php;
- root /home/wwwroot/;
- location ~ .*\.(php|php5)?$
- {
- fastcgi_pass unix:/tmp/php-cgi.sock;
- fastcgi_index index.php;
- include fcgi.conf;
- }
-
- if (!-e $request_filename) {
- RewriteEngine On
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
- }
-
- location /status {
- stub_status on;
- access_log off;
- }
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- }
- log_format access '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" $http_x_forwarded_for';
- access_log /home/wwwroot/logs/access.log access;
- }
- include vhost/*.conf;
- }
复制代码 另外一个方法也行不通- server
- {
- listen 80;
- server_name www.esinomarr.com;
- index index.html index.htm index.php;
- root /home/wwwroot/;
- include rewrite.conf;
- location ~ .*\.(php|php5)?$
- {
- fastcgi_pass unix:/tmp/php-cgi.sock;
- fastcgi_index index.php;
- include fcgi.conf;
- }
-
-
- location /status {
- stub_status on;
- access_log off;
- }
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- }
- log_format access '$remote_addr - $remote_user [$time_local] "$request" '
- '$status $body_bytes_sent "$http_referer" '
- '"$http_user_agent" $http_x_forwarded_for';
- access_log /home/wwwroot/logs/access.log access;
- }
- include vhost/*.conf;
- }
复制代码 下面是rewrite.conf代码- # 1.To use URL Alias you need to be running apache with mod_rewrite enabled.
- # 2. In your opencart directory rename htaccess.txt to .htaccess.
- # For any support issues please visit: http://www.opencart.com
- Options +FollowSymlinks
- RewriteEngine On
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*)\?*$ index.php?_route_=$1 [L,QSA]
复制代码
[ 本帖最后由 weiseven 于 2010-6-2 16:12 编辑 ] |
|