??? ??? lnmp ???. ?? ??? ?? ?? ?????. ?????!
??? ??? ????? WordPress ????->???? WordPress ??? ??? ??? ???? ?????.
????? ?? ????? ??? ????, ????? ????, ?? ??? ??? ?? ???? ????? ????? ????? ?????.
??? ????? ??? "?"? ?? ???? ip? ???? "?"?? ip? ?????. ?? ???? ?? ???? ??? ??? ????? ?????.
??? ????? /home/wwwroot/wordpress
??? ??, nginx.conf? ??? /home/wwwroot/
??, ???? ????? ??? ??? ????. code>http:/ /www.xxx.com/wordpress/home/wwwroot/wordpress
下,nginx.conf的root為 /home/wwwroot/
,訪問站點(diǎn)的方式為:http://www.xxx.com/wordpress
此時把nginx.conf里的root改為 /home/wwwroot/wordpress
,想要通過http://www.xxx.com
直接訪問站點(diǎn),這個思路應(yīng)該沒毛病吧,但是這樣就顯示403錯誤,搜了一下大都說403是權(quán)限問題,但wwwroot/
和wordpress/
?? nginx.conf? ??? /home/wwwroot/wordpress
? ???? ? ????? ???. >http://www.xxx.com
? ???? ?? ????? ??? ??? ???? 403 ??? ?????. ?? ??? ??? wwwroot/
? wordpress/
??? ??
???? ???? ?? ?? ? ??? ??? ??? ????. ????? ??? ??? ????? ????!
?? 3
??? ?? ??:
?? ?? ??:
?? ??? ?????? ? ?? ??? ??? ???? ?? ? ??? ?? ??? ??????. ?? URL? ???? ? ?? ??? 代碼
?? ????? ? ?? 3? ??? ??? ?? ?????
走同樣的路,發(fā)現(xiàn)不同的人生
?? 1? ???????
??:
??? ?? ??? ????? ? ??? "HOME"? ? ? ??? URL? http://xx.xx.xx.xx/wordpress
???:
???? ??? ?? "HOME"? ?????. ??? ??? ???->HOME? ??? ??? ?????
???? 1
?? 2? ?? ?????????:
nginx? ?? ???? ????.
???:
nginx.conf? ??? ? nginx? ?? ?????.
??? ???? ??? ??? ?? URL? .../.../wordpress/xxx/? ??? ???? CSS ???? ?? ??? ???? ?? ??? ???? WordPress ????? ??? ?????? ??? ???. ??.
? ????? ?? ?????. ?? ??? ?? ?????? ? ??? ??? ?? ???? ?? ??? ???? ?? ? ???????. ??? ??? ??? ?? SF?? ??? ? ?? ?????. ? ???????. ?? ??? ?? ? ???? ? ????. ???? ???? ??????. ???? ??? ???? ?????.
SO? ??? ??? ?? ??? ???? ???.
???? 2
?? 2? ?? ??????:
wp_options? ??? URL? www.xxx.com/wordpress
? ?????(/wordpress? wp ?? ?? ???????).
?? www? ?????. xxx .com
->nginx? ??? ??? ?????www.xxx.com/wordpress
(/wordpress為wp核心文件目錄)
將home改為www.xxx.com
->指向nginx設(shè)置的root
將/wordpress里的index.php
移動到/home/wwwroot/
/wordpress? index.php
? /home/wwwroot/
? ?????(?, nginx ?? ????? ?? ??? ??)
??? ?? ??? ?????.
?.