# LiteSpeed WebServer With Pterodactyl (CyberPanel)

<span style="color: rgb(0, 0, 0);">Setup main domain then “panel” as another subdomain. During the subdomain creation, make the location of the files **/panel/public**. Pull files from this directory back one into **/panel** and make sure Ptero's **/public** is the folder that CyberPanel is pointing to for it's VHost - This tricks CyberPanel into loading it.</span>

<span style="color: #000000;">Remember it's a laravel app, so you still need to install composer, run the composer install, sort out the database connections, fix the initial permissions from the Ptero docs, install redis and sort the pteroq service (including wings if adding it onto this system).</span>

<span style="color: rgb(0, 0, 0);">If you get error 500, click fix permissions in file location **/panel** and **/panel/public** in the CyberPanel files interface along the top.</span>

<span style="color: rgb(0, 0, 0);">Set **.htaccess** rules in the rewrite section of CyberPanel with:</span>

```html
RewriteEngine On
RewriteBase /
RewriteRule ^/index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
```

<span style="color: rgb(0, 0, 0);">**Note:** If not added, the panel will just 404 as it cannot redirect .php files to friendly URL’s.</span>

<span style="color: rgb(0, 0, 0);">For wings, it will fail since firewalld is blocking the ports. Go and open the ports in **/etc/firewalld/zones/public.xml** and update the public zone. Then **systemctl restart firewalld**. You can also do this in the Firewall page of CyberPanel along the left hand side.</span>