I rented an aliyun server and now it runs Django + fastcgi and runs normally. I want to add a wordpress blog, use php5-fpm. Blog. conf configuration: {code ...} I want to use the second-level domain name blog.joinwee.com, re-activated the php5-fpm, but the access is still prompted to be inaccessible... I rented an aliyun server and now it runs Django + fastcgi and runs normally. I want to add a wordpress blog, use 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; }}
To use the second-level domain name blog.joinwee.com, The php5-fpm is re-activated, but the access is still promptedUnable to access this webpage
Can the Server Run django and php at the same time? How do I set it?
Reply content:
I rented an aliyun server and now it runs Django + fastcgi and runs normally. I want to add a wordpress blog, use 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; }}
To use the second-level domain name blog.joinwee.com, The php5-fpm is re-activated, but the access is still promptedUnable to access this webpage
Can the Server Run django and php at the same time? How do I set it?
We need to use two server blocks, which are written in django and php respectively.
After writing, restart Nginx (or reload ).
Since it does not seem to be under the same domain name, it is divided into two servers to write
After all, nginx is only used for reverse generation.
My own servers are currently running both php and django.
I used the lnmp.org of June to build the lnmp environment,
When you need to run a php website, you can directly use vhost. sh
When running django, I use supervisord and uwsgi, and then manually write a copy of nginx for reverse generation.
Two servers or custom modification agents. To put it bluntly, nginx is only a proxy. You can customize the backend by yourself.