买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。1 X$ r8 }1 J* z& g
昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:' s$ u/ i5 k" K0 _) A. t( I
, Q' X. T2 A4 @/ e/ M ) `) ]6 G; a/ I" V; i
Hi,
! d1 |# ]8 E) F2 X6 ~% G; ^# K
D! ]1 {7 f: C, a) h3 Y; f" u- {+ P Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly: 5 _1 n! ~2 X' v
, E( v% Q m G! @ a
Just replace root /home/forge/default/public; with path to the script on your server.
9 W+ [5 N/ r X: M
( g# G! e1 q5 ^/ v( A server {
0 C# o/ ~6 O4 t: m' i S+ F4 M- C listen 80 default_server;
! n% s3 j. x2 t+ Y+ ^ server_name default;& r( R- m7 O# U& @8 t
root /home/forge/default/public;
! r2 J4 F7 N. F* W% u; o0 @: i " b7 ?4 X. f0 U- i) O+ X
index index.html index.htm index.php;! h3 u0 Y/ }3 C) }: b
X+ c& S3 M* p* s9 f charset utf-8;3 S. c# ^# M$ i4 U
, K( K; @8 a% m& l# O
location / {9 P5 x/ S: l1 z# D( U! X
try_files $uri $uri/ /index.php?$query_string;
|: c/ f! @4 ~; {0 o/ o7 l% Y }8 W" a) }9 R( u# `' u( I9 Y
8 N1 a1 F$ }$ ~" x location = /favicon.ico { access_log off; log_not_found off; }
. A+ P& `& a. R, M: L% s( I location = /robots.txt { access_log off; log_not_found off; }, p+ }2 }7 A& [( Q
& H/ y: Y- r% j( L+ N$ X# Y
access_log off;/ R+ {) ^+ f4 R. i9 _( U2 _
error_log /var/log/nginx/default-error.log error;0 c6 B3 l. @+ b" |0 j, @3 O
6 I5 O. @6 V; ~' ?! F error_page 404 /index.php;
S- y; s3 G ~0 l . {4 Y' R& V+ _2 B2 I9 X& |
location ~ \.php$ {' g" f. K0 k' w
fastcgi_split_path_info ^(.+\.php)(/.+)$;
- l }7 w( l$ e2 [: p fastcgi_pass unix:/var/run/php5-fpm.sock;
1 i* t, x, U% q8 {# L$ E* D. x fastcgi_index index.php;7 g! @5 h: A5 R! p6 M6 p3 }
include fastcgi_params;
8 w2 z W/ i# |+ X }# o& V" K9 H) A1 M. h+ B
/ r4 i) _# b: w8 ?( D
location ~ /\.ht {
6 K8 Z: A" V* p) `) {. h" G deny all;
6 \# e4 @( @: ]5 ~- S! w) L }5 s! P, k+ ?9 b) k i; Q, z9 M
} 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。4 u! @0 n9 u7 x' j7 Z. n7 j# F
- Y: ?+ i0 ~( v' B) r: n" x6 f
在线等,谢谢!!!5 x l1 b, E+ V# b6 [& Q" i
相关帖子