买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。
' D) B+ j5 i% s4 E( ` 昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:% x- V5 V$ e4 V% \; f
; P% O/ j2 D1 ~8 e$ j& t: g0 G) t6 K
& x7 |; e) |2 N Hi,1 c! N, Q6 B" D- y+ P5 u
% X7 A+ G' |4 a Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly:
! v' @4 ~0 A. H
/ I; U* z+ I$ y s. P Just replace root /home/forge/default/public; with path to the script on your server.. o; V: b: P; }4 J4 ~) y
; j6 [, E' M( _0 r. z. \ u. K server {
) g0 G6 H) A$ C7 f4 d8 n listen 80 default_server;
( Z' [' n" c R2 P7 F/ U/ @ server_name default;
# S+ F, Q! m# G' R. D root /home/forge/default/public;
* A% |7 c4 j5 e$ \( V% }* v ( ^: |3 ?! E' ~ `. `# B& _
index index.html index.htm index.php;
* B6 p& }" R) j( h' K7 f
3 r1 @. [# \( ?9 J6 E0 v charset utf-8;# P9 T9 a Z5 L9 {. Y% I
$ Y6 I4 k% N3 {, d location / {
2 s9 l/ h! U3 [0 h+ } try_files $uri $uri/ /index.php?$query_string;
3 B, R0 S6 @0 L M } h |) q* k/ Y3 e: g
# J7 | }3 u* R. S
location = /favicon.ico { access_log off; log_not_found off; }1 `% L# B% N- o
location = /robots.txt { access_log off; log_not_found off; }0 |7 a* h/ R$ F' ~: ?
- C1 E: ]7 m6 p: G3 ]" U6 \
access_log off;
3 ]; M4 |+ s( i1 X error_log /var/log/nginx/default-error.log error;0 h+ q* J" w+ C' ]- ~5 T
W' C' z7 ^$ y! k0 k* L error_page 404 /index.php;
- y8 ?8 e" P9 u7 { ( s8 P7 I1 z1 F% o! _) R* l
location ~ \.php$ {
, ^/ J6 N2 p+ Q% M4 G fastcgi_split_path_info ^(.+\.php)(/.+)$;/ E' B$ p% k" o, t+ j% m) u" A
fastcgi_pass unix:/var/run/php5-fpm.sock;
2 r4 D! F* h" `3 C7 r4 b$ K3 w4 ] fastcgi_index index.php;* A' l) }0 e3 u, c
include fastcgi_params;- N: E* Y! f: a/ e
}( d7 s6 _' d# [& T: ?3 J- }
, w- B& _, F' z$ j" w5 } location ~ /\.ht {
5 H3 K/ l. ?* Q, u* ?8 M deny all;
) Z) ^$ P% Z- ~& V$ \3 L4 q! } }# }" Y6 M6 U' r1 o3 R3 b% c6 F
} 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。
, ]* y# \0 q, r4 b; S ( {3 j3 p# U- o; R8 R4 Y
在线等,谢谢!!!
9 }" q( c. t$ Q( ~ }2 u
相关帖子