买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。8 d; a& N3 k0 n: m- N
昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:
/ K! v4 Z6 k/ W) ]; z: q, S, F' u
+ v' k0 M# U4 J! k7 O 8 |" ]: \+ Y7 @* u% F9 _/ w8 q
Hi,
j5 j: X# H/ U, D8 R6 {
! l% e1 U7 z4 f: L0 E Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly: * {( i+ h9 x6 q4 X6 z( `, x' c
# `0 U* \8 U6 v$ w, q Just replace root /home/forge/default/public; with path to the script on your server.
6 I r" Y2 |3 t& D1 ?% P
! D4 i' Z, L8 o0 r. {" N; G server {
, w8 n' p! O- j! f+ b listen 80 default_server;
/ [! `- v# q n: W' H9 p server_name default;4 B: L8 Y9 d3 h i
root /home/forge/default/public;
# P0 w/ k$ M0 ]) C % s1 ^. h% S- ?9 S, K: ~
index index.html index.htm index.php;
, ~* c" o& h; c3 i. i# h! }
4 r! c0 F7 n0 `. _# s charset utf-8;& D& o: a1 @/ Z. I$ X# j
1 b) Y. H3 `! }- i; B1 ?+ x
location / {
: L$ Y/ {5 M1 E/ Z- g9 ^ try_files $uri $uri/ /index.php?$query_string;$ ^6 G' P; g, e1 R: W: Y! A
}
, n3 ` s2 H8 F, D5 F* }3 T
$ y' d+ P+ U4 M4 @6 D3 @% H' o* i/ ? location = /favicon.ico { access_log off; log_not_found off; }
7 p0 R: {! m4 `. k location = /robots.txt { access_log off; log_not_found off; }
+ o& ^9 l: y( C) @; y! X8 e
$ {4 q3 g3 @8 Q2 [$ g- {1 o5 x access_log off;( Y: ^6 z# _) Z3 ^
error_log /var/log/nginx/default-error.log error; F1 [' \) Y8 F3 T5 L' I
3 b9 C( @0 B9 {- S: l0 @* F
error_page 404 /index.php;3 |/ E- Y1 v0 f* W) E! m' d
) i U3 _2 F6 X/ L7 n9 n
location ~ \.php$ {
( z j0 Z9 R: b9 b- t1 U fastcgi_split_path_info ^(.+\.php)(/.+)$;
0 M9 l& W' H3 D& e2 x: _+ f fastcgi_pass unix:/var/run/php5-fpm.sock;
G2 Q1 Y2 A( [9 s4 W; n% O9 S fastcgi_index index.php;
0 ^' s: E U+ [ include fastcgi_params;/ `5 @1 f+ K0 |. O) z* t
}
" Y; N, }4 Q9 R) n! a9 \ ; z5 y+ ]& f8 i# @) y- O
location ~ /\.ht {
3 Y Z! X1 B8 A0 j5 U2 E, q7 F deny all;
1 z( a; M8 J, N' {: G }3 u/ }7 m4 s4 s- i' A! H; F" m
} 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。7 t! B% b& z& N: `
' u! ]1 b6 s3 ]( a( C 在线等,谢谢!!!
1 d9 Z5 I, w$ k0 L
相关帖子