买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。
1 `9 P4 Y9 A3 R) v. E. U 昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:8 O6 v2 @: _) T# R
+ T: ?3 P" d$ d9 n- X. ~
9 m% n5 C l1 n# J- f V# | Hi,
" t' y9 C2 E5 R0 }0 k0 P
% M# b. @8 R) {1 P5 z9 m0 H2 Z Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly: $ p! m1 N% H6 j
" {+ o# d$ f+ F2 D" Z* u Just replace root /home/forge/default/public; with path to the script on your server.4 C i: u# l# ^3 `/ g
( }9 J. ]3 I* {" V server {
# C$ i8 ?( V/ Y: |7 x, @) N listen 80 default_server;0 T( ?) B$ O' M
server_name default;
/ n# t4 Q- f/ T/ \2 C. H5 l1 t g root /home/forge/default/public;, ]0 i" A; j T
5 }' ]7 t& c/ l9 Y
index index.html index.htm index.php;
* u+ S4 v$ i3 L0 |, T, P$ K
, @5 X3 I& A f) L* Q" U! I& n: T charset utf-8;+ N9 t) V# a& C1 A- R5 v3 p; y- F$ u
9 r4 c3 L. u2 i6 o' L( Z
location / {; u9 d" y- S: F3 P9 j* ]/ Y
try_files $uri $uri/ /index.php?$query_string;
0 i3 _# U; H* e5 R4 ]; C }
6 @' Q' {1 K' }: p! `. F b1 o3 j: t6 t# k0 Y
location = /favicon.ico { access_log off; log_not_found off; }/ W- _9 o5 D0 _: s- F
location = /robots.txt { access_log off; log_not_found off; }$ a) ]$ o* {& j/ l: S8 U& o; W
; ]% |8 F1 a# }# a
access_log off;2 m2 _6 B: L; }1 n2 O
error_log /var/log/nginx/default-error.log error;
% I1 O7 T: E2 A , a$ t) p' b# z- V
error_page 404 /index.php;' h' \2 u/ C2 I9 Z9 C% t! o
: [# H: D6 T2 p+ S location ~ \.php$ {
: V2 [+ J8 V3 K1 O fastcgi_split_path_info ^(.+\.php)(/.+)$;( b- {0 F4 a6 F& z
fastcgi_pass unix:/var/run/php5-fpm.sock;' X( b5 P0 J5 H+ q2 G9 K L/ Z
fastcgi_index index.php;
9 G, L! h5 P3 u5 P9 M9 V include fastcgi_params;
# b& p/ w8 ]+ y; ^; \! H" w, K }
2 H9 W# W1 ~! a0 v # `; h2 Z% S# `' A& _
location ~ /\.ht {
: J1 g4 X: R4 f. d& e: { deny all;& B& \+ \" q" J$ u' a! i6 p3 F
}" J" e, i3 I5 W5 t9 |5 W
} 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。
' \' o$ W, S8 K+ r: b" I1 U* @
( i2 @" s3 `4 P0 Y4 W 在线等,谢谢!!!, r' C- W. U2 |8 s
相关帖子