Skip to content

Commit

Permalink
updated confs
Browse files Browse the repository at this point in the history
  • Loading branch information
ayanchoudhary committed Jan 10, 2020
1 parent 5c11fa3 commit 4ff1e74
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 27 deletions.
35 changes: 26 additions & 9 deletions config/backend.sdslabs.conf
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
<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/
# ProxyPass / http://127.0.0.1:8000/
# ProxyPassReverse / http://127.0.0.1:8000/
ServerName portfolio-backend.sdslabs.co
Alias /static /home/portfolio/portfolio/staticfiles
<Directory /home/portfolio/portfolio/staticfiles>
Require all granted
</Directory>

Alias /media/projects /home/portfolio/portfolio/media/projects
<Directory /home/portfolio/portfolio/media/projects>
Require all granted
</Directory>

Alias /media/news /home/portfolio/portfolio/media/news
<Directory /home/portfolio/portfolio/media/news>
Require all granted
</Directory>

<Directory /home/portfolio/portfolio/portfolio>
<Files wsgi.py>
Require all granted
</Files>
</Directory>

WSGIDaemonProcess portfolio python-path=/home/portfolio/portfolio python-home=/home/portfolio/portfolio/venv
WSGIProcessGroup portfolio
WSGIScriptAlias / /home/portfolio/portfolio/portfolio/wsgi.py
</VirtualHost>
32 changes: 14 additions & 18 deletions config/portfolio.sdslabs.conf
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
<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>
DocumentRoot /home/portfolio/portfolio/frontend/dist
<Directory /home/portfolio/portfolio/frontend/dist>
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>
Order allow,deny
allow from all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
</Directory>
ErrorLog ${APACHE_LOG_DIR}/portfolio.error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/portfolio.access.log combined
Expand Down

0 comments on commit 4ff1e74

Please sign in to comment.