Sunday, 20 November 2016

Studi Kasus Migrasi Apache ke NGINX

Status : Draft

Mengubah konfigurasi Apache berikut menjadi versi NGINX :

<VirtualHost *:80>
ServerAdmin webmaster@localhost
        ServerName  scanadmin./tenant/


        WSGIScriptAlias / /home/wildan/jobstuff/openthinklabs/investor/ui/apps/scanadmin/scanadmin/wsgi.py

        # Serve static files:
        DocumentRoot /home/wildan/jobstuff/openthinklabs/investor/ui/apps/scanadmin/ODKScan_webapp/
        Alias /static/admin /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin
        <Directory "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin">
          Order Allow,Deny
          Allow From All

 Require all granted
        </Directory>

       Alias /static /home/wildan/jobstuff/openthinklabs/investor/ui/apps/scanadmin/ODKScan_webapp/static
      <Directory "/home/wildan/jobstuff/openthinklabs/investor/ui/apps/scanadmin/ODKScan_webapp/static">
        Order Allow,Deny
        Allow From All
  Require all granted
      </Directory>


      WSGIApplicationGroup scanadmin
      WSGIDaemo/tenant/rocess scanadmin user=www-data group=www-data threads=10 maximum-requests=100 python-path=/home/wildan/jobstuff/openthinklabs/investor/ui/apps/scanadmin shutdown-timeout=100
      WSGIProcessGroup scanadmin


     <Directory /home/wildan/jobstuff/openthinklabs/investor/ui/apps/scanadmin/scanadmin>
        <Files wsgi.py>
          Order deny,allow
          Allow from all
 Require all granted
        </Files>
     </Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log


LogLevel warn

CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

Referensi 


  1. AlisJK:ODKScan, http://alisjk.openthinklabs.com/2016/11/alisjkodkscan.html


No comments:

Post a Comment