Skip to content

Instantly share code, notes, and snippets.

@suhailvs
Last active August 3, 2021 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save suhailvs/786d1911db6ab126a8efabe38e4ca79d to your computer and use it in GitHub Desktop.
Save suhailvs/786d1911db6ab126a8efabe38e4ca79d to your computer and use it in GitHub Desktop.
centos

Setup Apache, mod_wsgi using Cpanel

Purpose: Need to serve uat.performancedynamics.ie to python

so the main conf file is: /etc/apache2/conf/httpd.conf

We have found config to serve the site at:

...

<VirtualHost 91.210.232.96:80>
  ServerName uat.performancedynamics.ie
  ServerAlias www.uat.performancedynamics.ie
  DocumentRoot /home/performancedynam/uat.performancedynamics.ie
  ServerAdmin webmaster@uat.performancedynamics.ie
  UseCanonicalName Off

  ## User performancedynam # Needed for Cpanel::ApacheConf
  <IfModule userdir_module>
    <IfModule !mpm_itk.c>
      <IfModule !ruid2_module>
        <IfModule !mod_passenger.c>
          UserDir enabled performancedynam
        </IfModule>
      </IfModule>
    </IfModule>
...

but when i edit this conf manually didn't worked. because the changes are reverted.

We need to change it to:

<VirtualHost 91.210.232.96:80>
  ServerName uat.performancedynamics.ie
  ServerAlias www.uat.performancedynamics.ie

    WSGIDaemonProcess uatapp
    WSGIScriptAlias / /var/www/PerformanceApp/app.wsgi

    <Directory /var/www/PerformanceApp>
        WSGIProcessGroup uatapp
        WSGIApplicationGroup %{GLOBAL}
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

it says

To customize this VirtualHost use an include file at the following location, Include "/etc/apache2/conf.d/userdata/std/2_4/performancedynam/performancedynamics.ie/*.conf"

But when i put the file, it still not loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment