Configuring the Wordpress as subdirectory can be tricky. In this tutorial, we will Setup a Django Website alongside a WordPress blog. Our Site Structure will be
example.com ------------> Django Website example.com/blog -----------> wordpress
sudo apt-get install nginx python-dev python-pip python-virtualenv mysql-server nginx php5-fpm php5-mysql
/home/ubuntu/micropyramid ├── blog │ ├── blog files ├── env └── micropyramid_django └── django files
server { listen 80 default_server; server_name example.com; location @wp { rewrite ^/blog(.*) /blog/index.php?q=$1; } location ^~ /blog { root /home/ubuntu/micropyramid; index index.php index.html index.htm; try_files $uri $uri/ @wp; location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_pass unix:/var/run/php5-fpm.sock; } } }
You can follow this link for configuring Django Application on domain. Now example.com should serve your django application and example.com/blog will serve your Wordpress Blog.
Micropyramid is a software development and cloud consulting partner for enterprise businesses across the world. We work on python, Django, Salesforce, Angular, Reactjs, React Native, MySQL, PostgreSQL, Docker, Linux, Ansible, git, amazon web services. We are Amazon and salesforce consulting partner with 5 years of cloud architect experience. We develop e-commerce, retail, banking, machine learning, CMS, CRM web and mobile applications.
Django-CRM :Customer relationship management based on Django
Django-blog-it : django blog with complete customization and ready to use with one click installer Edit
Django-webpacker : A django compressor tool
Django-MFA : Multi Factor Authentication
Docker-box : Web Interface to manage full blown docker containers and images
More...