Change the domain from SERVER_IP to SERVER_IP/quickbox or to quickbox.example.com


#1

Hi all,

Thank you for this great project and I am sorry if the topic is a little unclear, couldn’t think of a better way of phrasing it.

I installed the script on a fresh Debian 8 and all is good, The thing I am struggling with is I want to change the domain path from:
example.com to example.com/quickbox or quickbox.example.com

Thanks in advanced,


#2

quickbox.example.com is done in your dns. I have several domains and I just point an A record of like seedbox.domain.com to my seedbox and then I do another for seedbox2.domain.com,

It’s when you want to break the apps installed on QB down by subdomain or directories is when it gets a little complicated. So if I have seedbox.domain.com for quickbox panel, couchpotato.domain.com for couchpotato OR I have seedbox.domain.com/couchpotato, etc.


#3

Thanks.

Since I’m new about this stuff, I’ll have to read more about DNS and DNS configurations.


#4

Hi again,
Read about DNS, bind9 & apache2

I checked the /etc/bind directory and its files nothing appears to be changed by QuickBox

I also checked /srv/rutorrent/.htaccess and found this code:


RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]


I think it is resbosible to using https only

I also checked /etc/apache2/apache2.conf and found this at the end of the file


UserDir public_html
<Directory /home/*/public_html/>
Options Indexes FollowSymLinks MultiViews
AuthType Digest
AuthName "rutorrent"
AuthUserFile '/etc/htpasswd’
Require valid-user
AllowOverride None
Order allow,deny
allow from all

I think this code has to do with Authentication.

I also created a file in /var/www/html/test/test.php
When I type www.example.com/test/test.php it shows me:


Not Found

The requested URL /test/test.php was not found on this server.

Apache/2.4.10 (Debian) Server at example.com Port 443


I’m still learning but I’m hoping someone could direct me to right way.

Best regards,


#5

Hello…

I hear you about being new and trying to learn, as I’m not super elite with this myself, I’m just offering some thoughts on what you are seeing…

Would you not have to log in using https://www.example.com/test/test.php so it’s trying to make a secured connection? Unless you have within your configuration to point port 80 (regular WWW web traffic) to port 443 ?

Also is your DNS A record for your www.example.com domain has been pointed to whatever the public IP is of your seedbox? All of that is going to be done through a website domain manager like GoDaddy (as an example). That way when someone types in www.example.com it knows to connect to your seedbox which is located at 20.20.20.20 (as a random example ) IP address. And if your seedbox is behind a firewall or router, then there is configuration changes that need to be done on that so it knows to point incoming communication to your seedbox.

When it comes to this stuff, if you are not very familiar with it, I would suggest doing some reading online. There is a ton of material online to find to guide you through the processes. Especially if you have a name brand domain management and router.

If you’re looking for some further help, I can always try to give you a hand with it when I can… just PM me.


#6

Thanks a lot,

After reading your comment I went and opened this path:

/etc/apache2/sites-enabled

and found these files:

aliases-seedbox.conf
default-ssl.conf

I played around with them to see the results, I managed to open www.example.com/test/test.php

I think I’m gona try to change web port to browse and access my QuickBox dashboard like www.example.com:2244

Thanks again,


#7

Glad to hear you’re making headway!


#8

Hi all,

After reading and testing I managed to do what I want and it was so easy I felt silly to had so much time to figure it out.

All I have to do was to edit the following file “/etc/apache2/sites-enabled/default-ssl.conf” as below just change it with your settings.

SSLPassPhraseDialog  builtin
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  300
#SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin

<VirtualHost *:80>
ServerName example.com
ServerAdmin [email protected]
DocumentRoot /home/example/public_html
        <Directory "/home/example/public_html/">
                Options Indexes FollowSymLinks
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all

        Require all granted
        </Directory>
</VirtualHost>

<VirtualHost *:443>
Options +Indexes +MultiViews +FollowSymLinks
SSLEngine on
ServerName example.com
ServerAdmin [email protected]
DocumentRoot /home/example/public_html
        <Directory "/home/example/public_html/">
                Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all

        Require all granted
        </Directory>
        SSLEngine on
        SSLProtocol all -SSLv2
        SSLCipherSuite ALL:!ADH:!EX41121:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
        SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
        SetEnvIf User-Agent ".*MSIE.*" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
</Virtualhost>

<VirtualHost *:80>
		ServerName quickbox.example.com
        DocumentRoot "/srv/rutorrent/home"
        <Directory "/srv/rutorrent/home/">
                Options Indexes FollowSymLinks
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all
        AuthType Digest
        AuthName "rutorrent"
        AuthUserFile '/etc/htpasswd'
        Require valid-user
        </Directory>
SCGIMount /username 127.0.0.1:port
</VirtualHost>
<VirtualHost *:443>
Options +Indexes +MultiViews +FollowSymLinks
SSLEngine on
		ServerName quickbox.example.com
        DocumentRoot "/srv/rutorrent/home"
        <Directory "/srv/rutorrent/home/">
                Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all
        AuthType Digest
        AuthName "rutorrent"
        AuthUserFile '/etc/htpasswd'
        Require valid-user
        </Directory>
        SSLEngine on
        SSLProtocol all -SSLv2
        SSLCipherSuite ALL:!ADH:!EX41121:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
        SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
        SetEnvIf User-Agent ".*MSIE.*" \
                 nokeepalive ssl-unclean-shutdown \
                 downgrade-1.0 force-response-1.0
SCGIMount /username 127.0.0.1:port
</Virtualhost>

I thank all who helped me.

Best regards,


Run php apps beside Quickbox
#9

All you had to do is to add the ServerName lines to the vhosts, correct? I’m planning on implementing this on mine


#10

Yep, Also I read someone here said that it could be done in the DNS settings but I didn’t tried it out.