NameVirtualHost *:80
LoadModule wsgi_module modules/mod_wsgi.so
WSGISocketPrefix /var/run/wsgi
Alias /robots.txt /var/www/html/robots.txt

WSGIDaemonProcess 127.0.0.1 user=copr-fe group=copr-fe threads=15 display-name=other maximum-requests=8000 graceful-timeout=20
WSGIDaemonProcess api user=copr-fe group=copr-fe threads=15 display-name=api maximum-requests=8000 graceful-timeout=20
WSGIDaemonProcess backend user=copr-fe group=copr-fe threads=15 display-name=backend maximum-requests=8000 graceful-timeout=20
WSGIDaemonProcess stats user=copr-fe group=copr-fe threads=15 display-name=stats maximum-requests=8000 graceful-timeout=20
WSGIDaemonProcess tmp user=copr-fe group=copr-fe threads=15 display-name=tmp maximum-requests=8000 graceful-timeout=20
WSGIScriptAlias / /usr/share/copr/coprs_frontend/application

<VirtualHost *:80>
    ServerName copr.fedorainfracloud.org
    ServerAlias copr-fe.cloud.fedoraproject.org
    WSGIPassAuthorization On

    <Location />
        WSGIProcessGroup 127.0.0.1
    </Location>

    #ErrorLog logs/error_coprs
    #CustomLog logs/access_coprs common

    <Directory /usr/share/copr>
        WSGIApplicationGroup %{GLOBAL}
    Require all granted
    </Directory>

    {% if devel %}
    RewriteEngine on
    RewriteRule ^/\.well-known/(.*) /srv/web/acme-challenge/.well-known/$1 [L]
    RewriteRule "^/?(.*)" "https://%{HTTP_HOST}/$1" [L,R=301,NE]
    {% endif %}
</VirtualHost>


<IfModule mod_status.c>
ExtendedStatus On

<Location /server-status>
    SetHandler server-status
    Require all denied
    Require host localhost .redhat.com
</Location>
</IfModule>

<IfModule mpm_prefork_module>
    StartServers          8
    MinSpareServers       8
    MaxSpareServers      20
    MaxClients          50
    MaxRequestsPerChild   10000
</IfModule>

