Skip to content

Instantly share code, notes, and snippets.

@SamsadSajid
Last active April 15, 2018 19:00
Show Gist options
  • Save SamsadSajid/02980552d230e532190f381b5f3d8037 to your computer and use it in GitHub Desktop.
Save SamsadSajid/02980552d230e532190f381b5f3d8037 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
# WSGIScriptAlias /test1 /var/www/html/test1/test1/wsgi.py
WSGIDaemonProcess test1
WSGIScriptAlias /test1 /var/www/html/test1/test1/wsgi.py process-group=test1 application-group=%{GLOBAL}
Alias /test1/media /var/www/html/test1/media
Alias /test1/static /var/www/html/test1/static
# Alias /test1/admin_media /home/myuser/Django-/django/contrib/admin/media
#<Directory /opt/anaconda3/lib/python3.6/site-packages/django>
#Order allow,deny
#Allow from all
#</Directory>
<Directory /var/www/html/test1>
Order allow,deny
Allow from all
</Directory>
# for test2
# WSGIScriptAlias /test2 /var/www/html/test2/test2/wsgi.py
WSGIDaemonProcess test2
WSGIScriptAlias /test2 /var/www/html/test2/test2/wsgi.py process-group=test2 application-group=%{GLOBAL}
Alias /test2/media /var/www/html/test2/media
Alias /test2/static /var/www/html/test2/static
<Directory /var/www/html/test2>
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Alias /thub /var/www/html/thub/public/
<Directory "/var/www/html/thub/public">
AllowOverride All
Order allow,deny
allow from all
</Directory>
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment