Virtual host repetition for many ports

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi. I have apache behind a reverse proxy and listening to 30 ports. I want to shorten up my http.conf. I have been reading mod_vhost_alias docs but it seems only to handle names where I am only concerned about routing request from reverse proxy a specific backend port. So I have a large block of Listens from 8001 - 8030, followed by virtual hosts where the only difference between them is how port number fits into group and file naming scheme. I was hoping to use the variable %p in mod_vhost_alias to so I'd only have to do something like:

Listen 8001
Listen 8002

WSGIDaemonProcess 0001%p processes=1 threads=1 maximum-requests=5000
WSGIProcessGroup 0001%p
WSGIApplicationGroup %%{GLOBAL}
WSGIPassAuthorization On
WSGIScriptAlias / /path/to/bin/0001%p.wsgi


What i am starting with is below. Many thanks.

Regards,
David


Listen 8001
Listen 8002

<VirtualHost *:8001>
    WSGIDaemonProcess 00018001 processes=1 threads=1 maximum-requests=5000
    WSGIProcessGroup 00018001
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    WSGIScriptAlias / /path/to/bin/00018001.wsgi
</VirtualHost>
<VirtualHost *:8002>
    WSGIDaemonProcess 00018002 processes=1 threads=1 maximum-requests=5000
    WSGIProcessGroup 00018002
    WSGIApplicationGroup %{GLOBAL}
    WSGIPassAuthorization On
    WSGIScriptAlias / /path/to/bin/00018001.wsgi
</VirtualHost>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux