This is a sample Apache server configuration file which we can use to configure the server. Edit this file and use it according to your project paths.

<VirtualHost *:80>

ServerName example.com

ServerAlias www.example.com

Redirect permanent / https://example.com/

ServerAdmin webmaster@example.com

DocumentRoot /srv/django/example/src/example/

ServerName example.com

ServerAlias www.example.com

<Directory /srv/django/example/src/example/example>

<Files “wsgi.py”>

Require all granted

</Files>

</Directory>

Alias /static/ /srv/django/example/src/example/static/

<Directory /srv/django/example/src/example/static>

Require all granted

</Directory>

<Directory /srv/django/example/src/example/>

Order deny,allow

Allow from all

AllowOverride All

</Directory>

WSGIDaemonProcess example python-path=/srv/django/example/src/example:/srv/django/example/venv/lib/python2.7/site-packages

WSGIProcessGroup example

WSGIScriptAlias / /srv/django/example/src/example/example/wsgi.py

ErrorLog ${APACHE_LOG_DIR}/example_error.log

CustomLog ${APACHE_LOG_DIR}/example_access.log combined

</VirtualHost>

This file is to used for the Http connection.

--

--

Sarath Kumar R S

Sarath Kumar R S

9 Followers

Highly enthusiastic individual who is constantly looking solutions by using technology.