买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。
+ _3 `. h( r+ ^2 l) ~+ z 昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:
% r7 N0 A( Q+ W 9 e, `) A! X2 S2 u
0 W. w1 L7 k' T: E1 u8 t
Hi,
- z7 E1 d) y) y9 i7 n/ S5 k 3 w- ~2 y3 {% `) |2 O# A' u
Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly:
% z3 ?/ g' K) \& a0 Z, I6 `4 v' C: x
N7 G) ~$ E+ ` Just replace root /home/forge/default/public; with path to the script on your server.7 L- \7 Y4 L! K* Z
3 H3 F5 J2 T0 i4 d5 _ server {
8 @! [7 y$ R. X2 b6 S e5 N/ z6 v listen 80 default_server;# s8 E$ F* |+ ^5 }
server_name default;
3 v2 U' J' E7 z' c7 n$ ? root /home/forge/default/public;
5 Z7 p d1 F, E2 Y9 { . V" D$ x3 Z* B( e% N% S( j
index index.html index.htm index.php;
) M# W( e5 ?7 Y: S, {
0 ~8 Y, M/ |" p" u* e. t charset utf-8;
8 j1 E; ?8 D+ O. ~
6 Y: Q7 O1 P9 J- V8 l: {# ? location / { |; l ?: O; c4 h
try_files $uri $uri/ /index.php?$query_string;
) f( a x, C4 _: x2 i }
( \$ p4 X5 R' a9 F/ v 5 M' q# n2 W \; N5 e
location = /favicon.ico { access_log off; log_not_found off; }7 W% W) M; {' y) s6 f
location = /robots.txt { access_log off; log_not_found off; }" Q" [! s6 F8 F/ C7 L4 i
! ~1 }, j! Q+ p( L$ O. p7 ?4 V
access_log off;
% @) G6 D4 `+ u. v1 c/ q error_log /var/log/nginx/default-error.log error;
5 c& R. V) W. ?/ {! n
8 V- X. f7 u+ Z) _8 i# C# p error_page 404 /index.php;
* \! C& I& p3 _ t: S+ f8 T
; t. A% A; j. R" l# K location ~ \.php$ {/ s; d. |! Q! H3 {% l
fastcgi_split_path_info ^(.+\.php)(/.+)$;
) y8 n6 O, o: @" d2 q* f fastcgi_pass unix:/var/run/php5-fpm.sock;
5 w$ f! I. q8 R* X fastcgi_index index.php;
' U+ u/ U* Q6 R6 P7 Q include fastcgi_params;
: V. j0 t! v, l- j6 X s3 W }
2 |; \5 _/ t# `9 t" A5 a 5 t4 p0 T) s+ V7 W! N- P% |
location ~ /\.ht {6 B% r5 P% q. S, s: F6 x
deny all;
- M7 k( f6 y/ @; `$ O }2 G1 }/ ~9 U3 X6 |+ C
} 复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。
9 X7 v0 O- @5 x+ Y
8 K1 H: [! ~4 R) F9 G 在线等,谢谢!!!
; t' T& t+ G. b, i0 n/ j$ g
相关帖子