|
|
买的是荷兰的VPS, 装了LNMP 1.3,之前建虚拟主机,上传WP建站,一切都正常。。。2 e9 H5 _) N3 U9 b- a/ U
昨天又买了老外的PHP程序,上传。。。显示安装成功,打开主页却是404错误。。。发TK,提供了FTP。。。回复如下:2 ~8 F9 j8 M( p x. q! k- J- X
& f9 t% `4 {- j: W8 \) k7 o) t
2 M0 _2 L3 ?8 d$ E- Hi, Z: A2 D4 t8 M$ C; ~2 @" a
- & t! h7 r" \3 S% W( B
- Seems like you have installed it on nginx, you will need to use these rules to make (程序名字隐藏掉吧) work properly: : L4 c0 ^% G9 G4 {( R/ \
- ' D* j& f9 V( c
- Just replace root /home/forge/default/public; with path to the script on your server.
: }% o: N1 _ x& R/ d
. M8 V& y6 D/ ^; g: `' Q- server {! p' U8 N$ F2 T! c9 t6 K: \4 `
- listen 80 default_server;
! u7 W- x0 ~% x6 @ - server_name default;4 I0 V( F9 L' x {. R" ?
- root /home/forge/default/public;
$ ?) c+ b' o0 J* G
1 W( t* [+ i7 N `2 G- index index.html index.htm index.php; i" X4 B* d3 u& E# S- x
7 e- u' X4 Z' O' P, [# M& [" b C- charset utf-8;( S. D% a/ I0 F7 A1 z- R
, l9 P! u( K1 \, f4 B- location / {5 g1 O# K8 v8 C, ~' j" G! g
- try_files $uri $uri/ /index.php?$query_string;
7 O5 y$ O$ b! e8 B5 @+ E - }
: \. o7 c3 r9 l$ {3 [) Q - 7 j( g1 ?/ I! s/ k6 P# D ^8 Y$ @
- location = /favicon.ico { access_log off; log_not_found off; }
2 T) [; K8 R% c5 ~ - location = /robots.txt { access_log off; log_not_found off; }
" B% v! F; s/ r- T; ^
; O3 G4 J3 d* _4 w/ Q5 d: Y- access_log off;" W2 f4 T; ` J% G$ y( P
- error_log /var/log/nginx/default-error.log error;
" e. h- `% H' J0 a - 3 n' ^4 A3 n% y# [! k0 C
- error_page 404 /index.php;
# b' l8 `+ v$ ^; e
8 I- }" A0 ?3 C" r! C9 E0 u2 W- location ~ \.php$ {% B' {% M0 j9 b9 t# n6 s) ^
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
9 o6 ^( l! d7 }! m# L - fastcgi_pass unix:/var/run/php5-fpm.sock;
4 Q3 W( |+ [8 P* M ^, g' L' Z; | - fastcgi_index index.php;( M( [ I) ]4 I6 c* R! ^9 s
- include fastcgi_params;
" {4 {" ~( @6 \% N5 Q - }* ^% `7 q: K# m0 w6 Y8 T- [. H
' a- g2 v9 G& o( l3 Q1 |- location ~ /\.ht {6 c' _& c' b8 p b" f
- deny all;
( W3 q& _& f1 h, b6 N; W% R# o( B - }
$ B8 p) B/ z$ h. a - }
复制代码 请坛友帮助,具体怎么操作。我链接VPS,上传,修改,用的是 winSCP。。。
: F9 t; T, X; C8 v+ }& C
; u, j5 E3 c6 k, u在线等,谢谢!!!
$ a4 c7 g) _2 Y+ N |
|