Usando Apache
- Maquina Host
- Docker
Pacote PHP para Apache
Ao usar Apache diretamente na máquina, certifique-se de ter instalado o módulo libapache2-mod-php8.4.
sudo a2dissite 000-default.conf
sudo nano /etc/apache2/sites-available/panel.conf
Substitua <domain> pelo seu domínio ou endereço IP:
- Com SSL
- Sem SSL
# Substitua o <domain> pelo nome do seu dominio ou seu IP
<VirtualHost *:80>
ServerName <domain>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</VirtualHost>
<VirtualHost *:443>
ServerName <domain>
DocumentRoot "/var/www/jexactyl/public"
AllowEncodedSlashes On
php_value upload_max_filesize 100M
php_value post_max_size 100M
<Directory "/var/www/jexactyl/public">
Require all granted
AllowOverride all
</Directory>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/<domain>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<domain>/privkey.pem
</VirtualHost>
# Substitua o <domain> pelo nome do seu dominio ou seu IP
<VirtualHost *:80>
ServerName <domain>
DocumentRoot "/var/www/jexactyl/public"
AllowEncodedSlashes On
php_value upload_max_filesize 100M
php_value post_max_size 100M
<Directory "/var/www/jexactyl/public">
AllowOverride all
Require all granted
</Directory>
</VirtualHost>
sudo ln -sf /etc/apache2/sites-available/panel.conf /etc/apache2/sites-enabled/panel.conf
sudo a2enmod rewrite
sudo a2enmod ssl
sudo systemctl restart apache2
Se você subiu o painel via Docker com PANEL_PORT=127.0.0.1:8085, crie /etc/apache2/sites-available/jexactyl.conf:
<VirtualHost *:80>
ServerName <domain>
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R=301,L]
</VirtualHost>
<VirtualHost *:443>
ServerName <domain>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/<domain>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<domain>/privkey.pem
ProxyPreserveHost On
RequestHeader set X-Forwarded-Proto "https"
ProxyPass / http://127.0.0.1:8085/
ProxyPassReverse / http://127.0.0.1:8085/
</VirtualHost>
sudo a2enmod proxy proxy_http proxy_wstunnel rewrite ssl headers
sudo a2ensite jexactyl.conf
sudo apache2ctl configtest
sudo systemctl reload apache2