LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-06-2012, 05:20 AM   #1
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Rep: Reputation: 0
Question Webmin Apache Default server problems


Hello,

I recently got a2billing (a VoIP billing software) installed by a consultant on my server. He installed it so a2billing runs as the "Default Server" of apache.

I don't want it to be like that because not only does it feel naked, but also anyone from anywhere can access the server via http and boom, there's the login screen.

Long story short, I want to move it to it's own virtual host on apache (billing.domain.com). That way I can point all new domains I purchase and have them go to /var/www/index.html as a placeholder without needing to create a new virtual host each time I buy a domain. I'd rather have THAT as my default server and not a2billing.

I know how virtual hosts work but this "Default Server" is a little too complicated once you click on it.

This is the first screen on Apache server on Webmin. When you click through into "Default Server", you see all of these new things whereas I was hoping to see something like this which you see when you click into the "Virtual Server".

Either way, you get the drift. I want this to be a virtual host. I can't simply create a new virtual host with Server Name = billing.domain.com and Document Root = /usr/share/a2billing/1-current/stable/admin/ which seems to be very easy and should get the job done.

Basically, I want that ^^ to be the virtual host and I want default server to be "Any" server name and "/var/www" as Document Root.

Any help would be great. Thanks!!

Last edited by Devileyezz; 02-06-2012 at 08:03 PM.
 
Old 02-06-2012, 08:56 AM   #2
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
have you tried stopping a2billing , entering the vhost config in apache conf and then restarting apache? I see no reason why a new vhost wouldnt work with your specifications.
 
Old 02-06-2012, 08:04 PM   #3
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
My apologies. I forgot to attach the screenshots along with the post and that's why it was hard for you to understand where I'm coming from. Please take a look at it and you'll see why I find it difficult.
 
Old 02-07-2012, 09:18 PM   #4
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
lol
Now that the screenshots are in, everybody's stumped?
 
Old 02-07-2012, 10:17 PM   #5
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
The issue is that we have(let me speak for myself)...I have not had experience with your webapp(If I had the app, I would certainly figure it out).If you were doing it from commandline,then this would be so much easier(for me atleast).I was expecting a screenshot of your http.conf then I would advise you.But from your webapp, I have no idea on what to tell you as I have never used it before.
 
Old 02-07-2012, 11:45 PM   #6
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by cbtshare View Post
The issue is that we have(let me speak for myself)...I have not had experience with your webapp(If I had the app, I would certainly figure it out).If you were doing it from commandline,then this would be so much easier(for me atleast).I was expecting a screenshot of your http.conf then I would advise you.But from your webapp, I have no idea on what to tell you as I have never used it before.
I'll attach it in two minutes as soon as I find where it is. I think webmin changes the location.
 
Old 02-07-2012, 11:59 PM   #7
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Webmin said "File or directory to add virtual servers to" -> /etc/apache2/sites-available

So, obviously, /etc/apache2/httpd.conf is unavailable for comment.

Code:
root@phantom:~# cd /etc/apache2/sites-
sites-available/ sites-enabled/
root@phantom:~# cd /etc/apache2/sites-available/
root@phantom:/etc/apache2/sites-available# ls
a2billing_admin.conf  a2billing_customer.conf  default      freepbx.conf              a2billing_agent.conf  a2billing_index.conf     default-ssl  
root@phantom:/etc/apache2/sites-available# less default
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                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 /var/log/apache2/error.log

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

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>
Then there's...

Code:
root@phantom:/etc/apache2# cd sites-enabled/
root@phantom:/etc/apache2/sites-enabled# ls
000-default  a2billing_admin.conf  a2billing_agent.conf  a2billing_customer.conf  a2billing_index.conf  freepbx.conf  kasbahmanila.com.ph.conf  kasbahmanila.ph.conf  utang.ph.conf
root@phantom:/etc/apache2/sites-enabled# less 000-default
root@phantom:/etc/apache2/sites-enabled#
So, naturally, I went into 000-default...

Code:
root@phantom:/etc/apache2/sites-enabled# cat 000-default
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                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 /var/log/apache2/error.log

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

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>
root@phantom:/etc/apache2/sites-enabled#
So, now I don't understand how Webmin shows SO MANY symlinks :S
 
Old 02-08-2012, 11:31 AM   #8
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
As you are doing this whole thing via a cpanel , I could only advise you to change the whole dynamic of the way sites a structured:

For the httpd.conf below you can setup a bunch of sites and use different ports to access them.You can also setup passwords to enter a site:

Listen 80
Listen 8080

NameVirtualHost 172..0.0.0:80
NameVirtualHost 172.0.0.40:8080

<VirtualHost 172.0.0.40:80>
ServerName www.example1.com
DocumentRoot /www/domain-80
</VirtualHost>

<VirtualHost 172..0.040:8080>
ServerName www.example1.com
DocumentRoot /www/domain-8080
</VirtualHost>

<VirtualHost 172..0.0.40:80>
ServerName www.example2.org
DocumentRoot /www/otherdomain-80
</VirtualHost>

<VirtualHost 172.0.0.40:8080>
ServerName www.example2.org
DocumentRoot /www/otherdomain-8080
</VirtualHost>

You said you sometimes might not want others to view the sites, so here is a link on how to setup password authen

http://www.cyberciti.biz/faq/howto-s...htaccess-file/
 
Old 02-08-2012, 07:45 PM   #9
rhbegin
Member
 
Registered: Oct 2003
Location: Arkansas, NWA
Distribution: Fedora/CentOS/SL6
Posts: 381

Rep: Reputation: 23
GREAT information on webmin.
 
Old 02-08-2012, 11:34 PM   #10
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
cbtshare, thing is I buy lots of domains every now and then. But host only a handful.
So, my mindset was when I buy a domain I don't want to have to always set up a virtual host for them as most of them will go to /var/www/index.html which is the placeholder.

Every now and then I'd get a domain that I want to have a couple more pages, and for that a virtual host is fine. This whole dynamic got messed up when a2billing came into /var/www/.

Your suggestion is great, but unfortunately, it doesn't fit with what I'm looking to achieve. That's why I'm going nuts trying to move a2billing into it's own billing.domain.com virtual host.
 
Old 02-09-2012, 08:02 AM   #11
cbtshare
Member
 
Registered: Jul 2009
Posts: 645

Rep: Reputation: 42
ok I understand.Well I am not familiar with webmin, so may contacting support would help...I know cpanel has a forum to answer specific questions, so maybe webmin has such a place as well.
 
Old 02-09-2012, 10:39 PM   #12
Devileyezz
LQ Newbie
 
Registered: Nov 2006
Posts: 27

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by cbtshare View Post
ok I understand.Well I am not familiar with webmin, so may contacting support would help...I know cpanel has a forum to answer specific questions, so maybe webmin has such a place as well.
It's ok even if it's not webmin.
If it's direct conf files that you're comfortable with - np, I'll go with it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] still having problems with Webmin and apache not working blainemiller Linux - Software 15 09-07-2010 09:26 PM
webmin error: unable to open a webpage even though virtual server in apache is added arvindikchari Linux - Newbie 2 08-03-2010 08:33 AM
webmin system and server status apache is not runing hua Linux - Server 2 09-09-2008 04:19 PM
Webmin Server Status + Bash program to bring Apache up xbaez Programming 2 11-14-2005 07:57 AM
Webmin: The Apache server executable /usr/local/apache2/bin does not exist hektor Linux - Software 0 01-14-2005 06:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration