Skip to content

Instantly share code, notes, and snippets.

@suhailvs
Last active Aug 3, 2021
Embed
What would you like to do?
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