|
买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。
, ^; g% D& |/ ~. W! H昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:
7 P- H8 U! |) e4 N. u# d2 y: q$ J# R) [6 Z
' L- A& m+ s6 L3 R; R% r$ t/ Y6 E1 d
- Hi,5 Y8 h4 O$ _" m5 Y
- % j8 j5 g/ S9 e+ u! B
- Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly:
! C# h7 Q; }4 B5 }* }4 F( e1 y: m - % w% W7 A: A, z" U" a
- Just replace root /home/forge/default/public; with path to the script on your server.
1 O: G8 l4 k8 k o' i# z6 Z
2 Y# s. g, S4 V8 G5 x4 w- server {. B i( U, I" x C U% u- O7 g
- listen 80 default_server;! L( X* G9 r. ^7 i
- server_name default;' d! z5 b& c% u
- root /home/forge/default/public;! B- e9 D$ b( C5 X
! ]- Y* N3 d" o& F" L- index index.html index.htm index.php;
8 X. Z! v! l' ` - 3 k, x( z+ S& K) V/ |1 U
- charset utf-8;
& {2 u' T0 _# e0 c: q3 f" v - 2 o* n9 q: J: P# h2 D9 J
- location / {+ k( L& f) ~0 l. d
- try_files $uri $uri/ /index.php?$query_string;, J1 J: y$ M' @- j0 j
- }$ i) V; {, r# S( q
: b# X. i1 D: a; _- location = /favicon.ico { access_log off; log_not_found off; }
; c1 \" \+ R" \0 Z7 V6 x - location = /robots.txt { access_log off; log_not_found off; }6 r5 r: N e6 X$ u
, W [6 j( H( C/ e/ F- access_log off;5 i3 S0 n% ~; z' k8 c; g" Y- W
- error_log /var/log/nginx/default-error.log error;! f2 \& |& j3 D
- ) h% ^6 h# e, A. k* ?
- error_page 404 /index.php;
0 f& i/ _+ O; T9 p. J o - 5 y- Z$ t4 o/ R4 N- a5 l8 Z
- location ~ \.php$ {
0 B1 d0 T: `1 l+ u - fastcgi_split_path_info ^(.+\.php)(/.+)$;' P* _$ B1 v" M
- fastcgi_pass unix:/var/run/php5-fpm.sock;
6 d- J7 h! c4 M% M& \" N' W# @8 V - fastcgi_index index.php;
* T5 n% I h6 | - include fastcgi_params;
- B. V9 y3 B' ?! g8 c8 X - }3 Y" t2 f" e! [( V
( x# a% m1 M' Z+ g+ r- location ~ /\.ht {8 j: @' _; B6 v! ]" d
- deny all;
y+ W4 a/ ^7 V3 H% P - }3 ~: C- I$ p7 @) d5 C2 r$ A" D
- }
复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。
! k6 E5 j6 s' P& |, _4 k3 [$ Y) w. c; ]1 Y9 S+ i1 \/ m/ V2 T
在线等,谢谢!!!
% b- u2 D+ I! O, l6 b: \; t1 q2 w |
|