Rented is the Aliyun server, now running django+fastcgi, normal operation. Want to add a WordPress blog up, with PHP5-FPM.
BLOG.CONF configuration:
server {listen 80;server_name blog.joinwee.com;error_log /alidata1/wwwlogs/blog.error.log;access_log /alidata1/wwwlogs/blog.access.log;location / { index index.html index.htm index.php; root /alidata1/wordpress/; if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; }}location ~ \.php$ { include fastcgi_params; fastcgi_index index.php; #fastcgi_pass 127.0.0.1:53217; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; }}
Want to use the level two domain name blog.joinwee.com, the PHP5-FPM is moved, but the visit is still a hint无法访问此网页
Could the server run both Django and PHP at the same time? How do I set it up?
Reply content:
Rented is the Aliyun server, now running django+fastcgi, normal operation. Want to add a WordPress blog up, with PHP5-FPM.
BLOG.CONF configuration:
server {listen 80;server_name blog.joinwee.com;error_log /alidata1/wwwlogs/blog.error.log;access_log /alidata1/wwwlogs/blog.access.log;location / { index index.html index.htm index.php; root /alidata1/wordpress/; if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; }}location ~ \.php$ { include fastcgi_params; fastcgi_index index.php; #fastcgi_pass 127.0.0.1:53217; #fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; }}
Want to use the level two domain name blog.joinwee.com, the PHP5-FPM is moved, but the visit is still a hint无法访问此网页
Could the server run both Django and PHP at the same time? How do I set it up?
Use two server blocks, which are written in terms of Django and PHP, respectively.
After writing, pay attention to restarting the nginx (or reload).
Since it seems not under the same domain name, it is divided into 2 servers to write
After all, Nginx is just for the reverse.
My own server is currently running PHP and Django at the same time.
I used the lnmp.org of the military brother to build the LNMP environment,
When you need to run a PHP website, use vhost.sh directly
Need to run Django, I use Supervisord and Uwsgi, and then manually write a nginx to reverse the
2 server, or custom modification agent, plainly nginx is just a proxy, you make your own back-end can