Setup Apache
RHEL
This procedure works on RHEL, CentOS, AlmaLinux, Rocky Linux and Fedora. |
Install Apache2 HTTP server and uWSGI:
# dnf install httpd uwsgi uwsgi-plugin-python3
Copy examples of uWSGI services provided in Slurm-web packages and reload units:
# cp -v /usr/share/slurm-web/wsgi/agent/slurm-web-{gateway,agent}-uwsgi.service \
/etc/systemd/system/
# systemctl daemon-reload
Start and enable these services:
# systemctl enable --now slurm-web-agent-uwsgi.service slurm-web-gateway-uwsgi.service
Create file /etc/httpd/conf.d/slurm-web.conf
:
<VirtualHost *:80>
ProxyPass /agent unix:/run/slurm-web-agent/uwsgi.sock|uwsgi://agent/
ProxyPass / unix:/run/slurm-web-gateway/uwsgi.sock|uwsgi://gateway/
</VirtualHost>
Start and enable httpd
service:
# systemctl enable --now httpd.service
Slurm-web is now available at http://$HOST/ where $HOST is the public hostname of your server.
In case of failure, please refer to troubleshooting guide for help. |
Debian
This procedure works on Debian and Ubuntu. |
Install Apache2 HTTP server and uWSGI:
# apt install apache2 libapache2-mod-uwsgi uwsgi-core uwsgi-plugin-python3
Copy examples of uWSGI services provided in Slurm-web packages and reload units:
# cp -v /usr/share/slurm-web/wsgi/agent/slurm-web-{gateway,agent}-uwsgi.service \
/etc/systemd/system/
# systemctl daemon-reload
Start and enable these services:
# systemctl enable --now slurm-web-agent-uwsgi.service slurm-web-gateway-uwsgi.service
Enable Apache2 uwsgi module:
# a2enmod proxy_uwsgi
Create file /etc/apache2/sites-available/slurm-web.conf
:
ServerName $HOST
<VirtualHost *:80>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
ProxyPass /agent unix:/run/slurm-web-agent/uwsgi.sock|uwsgi://agent/
ProxyPass / unix:/run/slurm-web-gateway/uwsgi.sock|uwsgi://gateway/
</VirtualHost>
Where $HOST is the public hostname of your server.
Disable default site and enable new Slurm-web site:
# a2dissite 000-default
# a2ensite slurm-web
Reload Apache2 service to apply new configuration:
# systemctl reload apache2.service
Slurm-web is now available at http://$HOST/ where $HOST is the public hostname of your server.
In case of failure, please refer to troubleshooting guide for help. |