0

Is it possible to create a virtual server on the same subdomain the admin console is on port 10000 in Virtualmin?

I have tried this, but I just get the Apache2 Debian Default Page.

For example, the admin console is on

https://admin.domain.com:10000

and the subdomain I want to create is on

https://admin.domain.com

2 Answers 2

1

Create a new virtual host using the same subdomain but listening on port 80. Here's an example for a default virtualhost (key being the number of the port in the first line of the configuration file) :

<VirtualHost *:80>
        ServerName admin.domain.fr
        DocumentRoot /var/www

        <Directory /var/www/>
                Options FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

You'd have to adapt it to your context of course, notably the document root and the server name.

4
  • Do you believe any further elaboration is necessary?
    – oldmud0
    Aug 3, 2016 at 19:17
  • @oldmud0: I added an example, if that was your point. But I prefer to help people to search for themselves by giving them the keywords.
    – Doezer
    Aug 3, 2016 at 19:40
  • Thanks, but this doesn't solve the issue because Virtualmin has already created an apache conf for admin.domain.com:80 pointing to the correct document root - however, it doesn't override Apache's default page. This must be because the hostname of the server is the same as the subdomain I'm wanting to create. All other domains and subdomains work.
    – James Hyde
    Aug 4, 2016 at 6:51
  • Can you provide your original answer with every every virtual host related to the issue?
    – Doezer
    Aug 4, 2016 at 6:57
0

On Webmin open: Servers -> Apache Webserver -> Open the options for the desired server

From the Virtual Server options choose Edit Directives and comment out (put # in front) these lines:

RewriteCond %{HTTP_HOST} =admin.[your-host-name]
RewriteRule ^(.*) https://[your-host-name]:10000/ [R]

Click Save.

Then you can use admin subdomain from your application.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .