买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。& z5 |" j3 _9 E! j
昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:
. ]! b3 r3 b' F2 i }3 E " ?" y: K- d% r& o3 a! g
3 f+ U9 s0 Z( f2 k; {2 P( m8 o, C6 g
Hi,
+ o0 ~( \: m$ l$ ~, k# k ! @% c* f% [- [/ u* ?% w# `
Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly: - U$ K! f! F$ k( f, e
' t/ a* M& c, e; E2 R; i5 D+ {7 o Just replace root /home/forge/default/public; with path to the script on your server.2 c; V; {$ z8 C! u
8 v+ {* f$ t9 h7 b7 Q server {0 N; ?% Z* Y# r4 m# C
listen 80 default_server;
% k' M, v; r: o c3 V/ e( x' r5 h server_name default;
# b' [1 ~* B9 `) y root /home/forge/default/public;- B$ T3 Y, z# w s9 c# j) p
* r+ Z8 N: [" \6 V' O
index index.html index.htm index.php;
! B4 A* t6 v X- U0 V! E8 ~
( Q- f. K! F j$ u% \4 |' U charset utf-8;
* _5 D/ X# V d. V2 ? d! W % c0 E& l: v; _' c7 m
location / {1 G& ?4 L* g1 z# R9 p g
try_files $uri $uri/ /index.php?$query_string;
6 J& w" N5 ~0 _, G }
$ Q4 } \: z9 T& L" E / e( N/ F9 {* [: ^
location = /favicon.ico { access_log off; log_not_found off; }4 X* N+ \/ A! p$ l4 |8 m+ A, ]1 o- I
location = /robots.txt { access_log off; log_not_found off; }$ L4 o6 p2 p- U
1 o- j* w! A5 L+ c: o- k
access_log off;
" L @9 J; k b$ _: r* \$ | error_log /var/log/nginx/default-error.log error;( T: {8 K. X I* }' K8 t% \" C
# \5 C) e: I# ~; n1 f
error_page 404 /index.php;
$ X- E9 h+ f, L3 E# K ! t9 z0 I' x P( _
location ~ \.php$ {
% c2 |# \/ i* X7 G1 E; l- K. a fastcgi_split_path_info ^(.+\.php)(/.+)$;+ ^1 D+ l9 b3 S1 k; i2 K, H% U; s
fastcgi_pass unix:/var/run/php5-fpm.sock;
6 i& U/ c2 ?) n3 X; j) n* n- F" ~2 E1 C fastcgi_index index.php;
: x4 B; J/ c2 O' ~; a5 J$ ^ include fastcgi_params;
- E1 C8 F( G$ {* \- `6 ?; g }1 a! B X/ u/ z- W
, [, S8 _0 c/ L* a location ~ /\.ht {7 p! N( N- ?( s Z5 O: {( V
deny all;
! W' E4 n; y& c/ u. L' O, c0 \ }
& q: {$ z. }- O9 C: W } 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。( u p6 ]& \( P2 P V6 y1 S
0 u: D; C3 ~+ I- a1 v3 c+ `7 E
在线等,谢谢!!!/ ~ O) [5 @- @7 `! a5 ]: ^
相关帖子