Welcome to the PufferPanel community forums! If you need help please register an account and post in the Support category.

Pufferpanel different directory



  • So i've got pufferpanel installed in srv/pufferpanel

    How do i change it so it's not in the root of my website?

    for example it's installed in /testpufferpanel so when i go to my website i can dop

    www.examplewebsite.com/testpufferpanel

    and it'll take me to my pufferpanel installation?

    Thanks.



  • pufferpanel can only be accessed by the FDQN by default. you could use a subdomain for the panel and use your main domain for your site all on the same machine using virtual hosts.

    since this is close to this post. You may want to refer there.

    If you only want it to be accessed as a directory you are going to have to modify the nginx config for pufferpanel.



  • I checked in /etc/nginx/nginx.conf? where does it define the directory for pufferpanel.



  • its not in there. the pufferpanel config is in /etc/nginx/sites-available/.



  • @SirCoolness

    server {
    listen 80;
    root /srv/panel/pufferpanel;
    index index.php;

    Am i missing soemthing? Or is it not possible to put it in another directory



  • is that your whole config?



  • @SirCoolness no?

    server {
            listen 80;
            root /srv/panel/pufferpanel;
            index index.php;
            server_name [HiddenIP];
            client_max_body_size 20m;
            client_body_timeout 120s;
            location / {
                try_files /public/router.php =404;
                fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index router.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include /etc/nginx/fastcgi_params;
            }
    
            location /assets {
                try_files /app/$uri =404;
            }
        }
    
        #server {
        #    listen 443;
        #    root /srv/pufferpanel;
        #    index index.php;
        #
        #    server_name [HiddenIP];
        #
        #    ssl on;
        #    ssl_certificate     /etc/nginx/ssl/[HiddenIP].crt;
        #    ssl_certificate_key /etc/nginx/ssl/[HiddenIP].key;
        #
        #    location / {
        #        try_files /public/router.php =404;
        #        fastcgi_split_path_info ^(.+?\.php)(/.*)$;
        #        fastcgi_pass unix:/var/run/php5-fpm.sock;
        #        fastcgi_index router.php;
        #        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        #        include /etc/nginx/fastcgi_params;
        #    }
        #
        #    location /assets {
        #        try_files /app/$uri =404;
        #    }
        #}
    

    ip has been blurred out



  • @jordan
    looks like your not missing anything. if you want to change the domain where you can access your server do this (ubuntu/debian)

    • backup your pufferpanel nginx config and /etc/hosts
    • edit your pufferpanel nginx config
    • replace the entry after server_name (line 5) with a new domain that you want
    • edit /etc/hosts with your favorite text editor
    • change
    127.0.0.1	localhost
    
    • to somthing like
    127.0.0.1	[yourdomain] localhost
    
    • save
    • restart nginx (sudo service nginx restart)


  • @SirCoolness i don't want to change the domain i want to change the directory.



  • ah ok if im not mistaken you can add rule in the default nginx config stating that if someone goes to domain.com/puffer it will take them to /srv/pufferpanel. then disable the pufferpanel config, and restart nginx.

    i want to point out that this is a bit more technical so i hope your comfortable with editing nginx.



  • PufferPanel does not support being located in a subdirectory. If you have a domain you can create a subdomain for PufferPanel, such as panel.example.com.



  • @puffrfish how does one do this?



  • You need to make an A record that points to the IP of your server for the subdomain at your DNS provider, which is usually the same as your domain registrar.

    Then you'll need to provide the PufferPanel installer with the subdomain when it asks you for the FQDN. You can either reinstall PufferPanel or use ./pufferpanel updatesite

    Since you have already installed PufferPanel previously you'll also need to edit /etc/nginx/sites-enabled/pufferpanel.conf and change the "server_name" line to be the new subdomain.


Log in to reply
 

1
Online

666
Users

708
Topics

3.2k
Posts

Looks like your connection to PufferPanel Community was lost, please wait while we try to reconnect.