Skip to content

Commit

Permalink
feat:add vhosts
Browse files Browse the repository at this point in the history
  • Loading branch information
ayanchoudhary committed Jan 2, 2020
1 parent 3c0b630 commit 8707638
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
12 changes: 12 additions & 0 deletions config/backend.sdslabs.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<VirtualHost *:80>
# ProxyPreserveHost On
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
ProxyPass / http://127.0.0.1:8000/
ProxyPassReverse / http://127.0.0.1:8000/
ServerName portfolio-backend.sdslabs.co
</VirtualHost>
27 changes: 27 additions & 0 deletions config/portfolio.sdslabs.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<VirtualHost *:80>
# ProxyPreserveHost On
# Servers to proxy the connection, or;
# List of application servers:
# Usage:
# ProxyPass / http://[IP Addr.]:[port]/
# ProxyPassReverse / http://[IP Addr.]:[port]/
# Example:
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ServerName portfolio-beta.sdslabs.co
DocumentRoot /home/d3mon/Projects/portfolio/frontend/src
<Directory /home/d3mon/Projects/portfolio/frontend/src>
Options -Indexes -MultiViews
Allowoverride all
Require all granted
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ - [QSA,L]
RewriteRule ^api/(.*)$ http://localhost:8000/api/$1 [END]
RewriteRule ^(.*)$ http://localhost:8080/$1 [P]
</Directory>
ErrorLog ${APACHE_LOG_DIR}/portfolio.error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/portfolio.access.log combined
</VirtualHost>
2 changes: 1 addition & 1 deletion settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

CORS_ORIGIN_ALLOW_ALL = DEBUG

ALLOWED_HOSTS = []
ALLOWED_HOSTS = ["*"]


# Application definition
Expand Down

0 comments on commit 8707638

Please sign in to comment.