WordPress伪静态请教
VPS按照好后 我是直接在 /usr/local/nginx/conf/nginx.conf修改的如下内容:
server
{
listen 80;
server_name fangtr.com www.fangtr.com;
index index.html index.htm index.php;
root/home/wwwroot/fangtr/;
include /usr/local/nginx/conf/wordpress.conf;
重启过后
可以打开Blog的首页 但是文章打开显示
抱歉,无法打开该页面
求教 谢谢 你执行 /root/vhost.sh 试试~~
回复 2# 的帖子
之前也试过了 差不多的问题 这一个就要看情况了呀,你是使用的什么服务器呀?还有啊。。这一个WORLDPRESS的INLUCDE是加在你的虚拟主机里面的吧? server {listen 80;
server_name ccvita.com www.ccvita.com;
location / {
index index.html index.htm index.php;
root /www/wwwroot/ccvita.com;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:8787;
fastcgi_param SCRIPT_FILENAME /www/wwwroot/ccvita.com$fastcgi_script_name;
}
location /ccvita-status {
stub_status on;
access_log off;
}
} 看着这一个样本做就可以弄得出来了。 原帖由 yuweitaocn 于 2011-10-28 22:40 发表 https://bbs.vpser.net/images/common/back.gif
看着这一个样本做就可以弄得出来了。
好的 谢谢 我去试试看
回复 5# 的帖子
我使用的linode的vps,操作系统是Debian,安装的是 LNMP0.7试过前面的 还是无法做伪静态
按照你的,直接打开是502
回复 8# 的帖子
fastcgi的地址和端口改成军哥的。。应该是127.0.0.1"9000回复 9# 的帖子
出现:502 Bad Gateway错误了 求助啊 怎么才能做wordpress的伪静态? 不会自己改配置就直接用/root/vhost.sh 添加
lnmp不是用端口的是用socket的 原帖由 licess 于 2011-12-15 13:27 发表 https://bbs.vpser.net/images/common/back.gif
不会自己改配置就直接用/root/vhost.sh 添加
lnmp不是用端口的是用socket的
我直接用vhost.sh增加的也没有效果
include wordpress.conf;
直接没有效果 贴配置看看
回复 14# 的帖子
userwww www;worker_processes 1;
error_log/home/wwwlogs/nginx_error.logcrit;
pid /usr/local/nginx/logs/nginx.pid;
#Specifies the value for maximum file descriptors that can be opened by this process.
worker_rlimit_nofile 51200;
events
{
use epoll;
worker_connections 51200;
}
http
{
include mime.types;
default_typeapplication/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_max_body_size 50m;
sendfile on;
tcp_nopush on;
keepalive_timeout 60;
tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 64k;
fastcgi_buffers 4 64k;
fastcgi_busy_buffers_size 128k;
fastcgi_temp_file_write_size 256k;
gzip on;
gzip_min_length1k;
gzip_buffers 4 16k;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
#limit_zonecrawler$binary_remote_addr10m;
server
{
listen 80;
server_namexxxxx.com www.xxxxx.com;
index index.html index.htm index.php;
root/home/wwwroot/;
include wordpress.conf;
location ~ .*\.(php|php5)?$
{
fastcgi_passunix:/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_formataccess'$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log/home/wwwlogs/access.logaccess;
}
include vhost/*.conf;
}
页:
[1]
2