useradd lsws
chown -Rv lsws:lsws /var/www/pterodactyl
Create file /usr/local/lsws/conf/vhosts/yourdomain.com.conf
:
docRoot /var/www/pterodactyl/public
vhDomain yourdomain.com
adminEmails [email protected]
enableGzip 1
cgroups 0
errorlog /usr/local/lsws/logs/pterodactyl.app-error.log {
useServer 0
logLevel ERROR
rollingSize 100M
}
accesslog /usr/local/lsws/logs/pterodactyl.app-access.log {
useServer 0
logFormat %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"
logHeaders 7
rollingSize 100M
keepDays 60
compressArchive 1
}
index {
useServer 1
autoIndex 0
}
expires {
enableExpires 1
}
phpIniOverride {
php_admin_value error_reporting 22519
php_admin_value error_log /usr/local/lsws/logs/pterodactyl.app-error.log
php_admin_flag log_errors On
php_admin_flag display_errors Off
}
rewrite {
enable 1
autoLoadHtaccess 1
}
Default is Flexible, change to Full
Create new
Generate private key and CSR with cloudflare > RSA (2048)
Hostnames: <Leave default>
Certificate Validity: 15 years
Paste text from "Origin Certificate" box into new file /usr/local/lsws/conf/cert/key.pem
Paste text from "Private Key" box into new file /usr/local/lsws/conf/cert/cert.pem
Run As User: lsws
Run As Group: lsws
Virtual Host Name: yourdomain.com
Virtual Host Root: /var/www/pterodactyl
Config File: $SERVER_ROOT/conf/vhosts/yourdomain.com.conf
Notes: <Leave default>
Max Keep-Alive Requests: <Leave default>
Follow Symbolic Link: No
Enable Scripts/ExtApps: Yes
Restrained: Yes
External App Set UID Mode: <Leave default>
suEXEC User: <Leave default>
suEXEC Group: <Leave default>
Static Requests/second: <Leave default>
Dynamic Requests/second: <Leave default>
Outbound Bandwidth (bytes/sec): <Leave default>
Inbound Bandwidth (bytes/sec): <Leave default>
Listener Name: Default (SSL)
IP Address: ANY IPv4
Port: 443
Binding: <Leave default>
Enable REUSEPORT: <Leave default>
Secure: Yes
Notes: <Leave default>
Private Key File: /usr/local/lsws/conf/cert/key.pem
Certificate File: /usr/local/lsws/conf/cert/cert.pem
Assign your virtual host(s) and set the domain name(s)
Assign your virtual host(s) and set the domain name(s)