买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。4 u* }5 z! ^, J0 ] Q3 Q7 X: V0 F
昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:5 \# I5 m3 e2 A8 N# [, r
! N% P( ^, a& J5 p. k " x5 a' w) s) ~0 ~3 S# a C; d
Hi,
7 z1 s' {' ?1 ?' m6 X9 Y0 @
1 ^7 N6 S0 d& v( ` Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly: ' F0 |2 j3 ?# m5 \1 L( y p
/ m8 u8 i5 j* g$ \2 N+ D/ ~
Just replace root /home/forge/default/public; with path to the script on your server." S O) m3 e- h/ j' ^ n2 j
: K$ x7 A5 \5 P/ G; |) u- E* Q
server {$ I5 m! p& J1 [; x
listen 80 default_server;7 _5 Z) u- [* r; G( c% I
server_name default;/ i" N$ Y0 \: U( N! U7 u
root /home/forge/default/public;
* h% P, c1 p0 o5 m2 n2 m; ] 2 E. K. A) H& `" m4 `' P& J# \
index index.html index.htm index.php; Q g3 T- _" N1 t8 c$ @
: W& Y& i+ b& S1 A
charset utf-8;- p& y8 D U3 L1 J
) p4 N2 m8 a0 P8 [ location / {0 P: Y, Y2 ?6 \# R7 Z- n
try_files $uri $uri/ /index.php?$query_string;# u7 x/ b1 L" c2 u* P/ W
}+ Z2 B b @2 ?+ Q
, M6 @; {+ g4 r5 Q& ` location = /favicon.ico { access_log off; log_not_found off; }2 G7 v+ J- b t. s$ [6 {8 F
location = /robots.txt { access_log off; log_not_found off; }
X" }4 V. C7 w2 Y* k6 g
8 k6 Y/ @; c0 ?# r" m access_log off;/ m7 O" i& w3 v; F. {' {+ \ d
error_log /var/log/nginx/default-error.log error;
! o2 ^/ X3 x; r4 l) z6 I 4 \* e. |* r5 e
error_page 404 /index.php;
9 s+ b# `. d/ x) U 6 e0 @# W/ e$ ~! q3 s4 ]: K
location ~ \.php$ {
7 ~1 n, r3 ~. X5 p! {' ] fastcgi_split_path_info ^(.+\.php)(/.+)$;9 l& e3 i8 p S: C" I3 s
fastcgi_pass unix:/var/run/php5-fpm.sock;& w2 V) D; h! N7 j$ `; `, ?
fastcgi_index index.php;
: \* X1 D& c, _+ N include fastcgi_params;
) m+ i7 ^4 \ L D5 N# |/ N }
' K+ j' Q7 @& x6 T; J
/ c5 Z% v2 a# a1 t$ k/ Y( l location ~ /\.ht {
0 O) d/ h3 t/ D, o' s deny all;
6 t% U! O* K2 w4 {7 {$ J8 y0 y }" K6 w0 _; S, q; A/ x
} 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。4 c: }$ g0 E( O
; i# i# I, D4 h! U" h$ f 在线等,谢谢!!!& Z: h% h" J6 m2 H; [2 B
相关帖子