买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。
- u* W5 ]) F1 s5 I 昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:
7 a5 p! f$ A; k5 ?" G9 L $ w N1 ~5 I* y* z# D3 R6 ^3 V s9 T
. [4 d" i, t s3 }4 L Hi, D2 U" L: _. b* t
- z8 F- Q; U' T' `* H
Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly: & Q$ ]$ }/ f) A+ G
% [/ U, k* S0 q$ X3 g7 U8 Q
Just replace root /home/forge/default/public; with path to the script on your server.
( ? F0 t: U0 c$ E$ R
; c, w: i, o( P5 [4 I+ i. G server {
# {6 I9 @+ P8 D G listen 80 default_server;
- V( y% |. k4 ^4 p3 V+ h, J server_name default; J* C. S0 n, V, z
root /home/forge/default/public; N6 w. D: k- N5 L3 Q
7 A2 N. o8 A* x3 B* y index index.html index.htm index.php;
' D- l$ x2 a s t7 x: l+ ? / i3 D, k9 T. n/ @
charset utf-8;9 U, D8 A6 {) ^
, A7 X1 h4 T) ~1 a' F: Z9 @1 r location / {! [1 a' g! O, V E
try_files $uri $uri/ /index.php?$query_string;
7 j8 s# {7 n$ J' E# \7 u }4 w% ?; H' K: Z
f5 B) X1 {8 t( H- i) T4 D- l' s location = /favicon.ico { access_log off; log_not_found off; }
; B; E3 _9 U" u; R location = /robots.txt { access_log off; log_not_found off; }. o8 I, F, }1 O! H" u
! t7 V8 i; g: n/ A9 F' p
access_log off;
" R0 L9 l$ ]4 P4 F% D error_log /var/log/nginx/default-error.log error;
Q. v% Q/ c3 \ ; `7 }- q+ h; @" Q+ E
error_page 404 /index.php;* n6 X R0 [# ?1 m/ B
! b" G9 ^" w2 q$ B, H location ~ \.php$ {( q5 k. J1 y' O' h+ ~0 b' P2 r b# B. m
fastcgi_split_path_info ^(.+\.php)(/.+)$;
8 U( n' z+ N* n5 L& v fastcgi_pass unix:/var/run/php5-fpm.sock;1 z0 n# Q7 F/ i! M4 j
fastcgi_index index.php;
% i' Q4 l" \* b; S# a; {. F) S include fastcgi_params;
: t/ D* p. a( L" ^$ ^! R }! F" H. r% g9 f x0 D; r: n r$ B
: \2 W' @& V' S. Y) V
location ~ /\.ht {& H/ y' Z5 S% J5 A3 S! p
deny all;- h) C, u1 A: P8 Q7 W% e9 D
}; \ u7 R- t: r2 F* C4 m3 J
} 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。9 @. u4 W) R7 l: g# u1 W
& {4 b! O* x, x& t0 `; K4 q 在线等,谢谢!!!
+ z% N) u7 N6 ]8 V# F- i1 A
相关帖子