Results 1 to 7 of 7

Thread: Configuring virtual hosts in httpd.conf..

  1. #1
    Network|Geek kidzer's Avatar
    Join Date
    Jul 2005
    Location
    Aberdeenshire
    Posts
    1,732
    Thanks
    91
    Thanked
    47 times in 42 posts
    • kidzer's system
      • Motherboard:
      • $motherboard
      • CPU:
      • Intel Q6600
      • Memory:
      • 4GB
      • Storage:
      • 1TiB Samsung
      • Graphics card(s):
      • BFG 8800GTS OC
      • PSU:
      • Antec Truepower
      • Case:
      • Antec P160
      • Operating System:
      • Windows 7
      • Monitor(s):
      • 20" Viewsonic
      • Internet:
      • ~3Mbps ADSL (TalkTalk Business)

    Configuring virtual hosts in httpd.conf..

    ....is this the correct way to do it?

    I've been reading a number of guides, and they all seem to say different things - but I've been experimenting, and setting virtual hosts for subdomains seems to work when putting them in httpd.conf, so I'm happy with that.

    But I really know nothing of apache, so have I done it in a poor way, or is this an alright way to go about it?

    Also, is there (probably a bit of a mental request - we'll see!) a tool I can run either locally or remotley that will try and find exploits in my current setup, so I can patch any holes in it ASAP?

    Cheers,
    David
    "If you're not on the edge, you're taking up too much room!"
    - me, 2005

  2. #2
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Configuring virtual hosts in httpd.conf..

    Most distros have their own take on how to best admin things in a modular way - e.g. having a per-site config and per-module config so you don't "pollute" your main httpd.conf

    Make sure you read guides for your distro, preferably from the official docs

  3. #3
    Network|Geek kidzer's Avatar
    Join Date
    Jul 2005
    Location
    Aberdeenshire
    Posts
    1,732
    Thanks
    91
    Thanked
    47 times in 42 posts
    • kidzer's system
      • Motherboard:
      • $motherboard
      • CPU:
      • Intel Q6600
      • Memory:
      • 4GB
      • Storage:
      • 1TiB Samsung
      • Graphics card(s):
      • BFG 8800GTS OC
      • PSU:
      • Antec Truepower
      • Case:
      • Antec P160
      • Operating System:
      • Windows 7
      • Monitor(s):
      • 20" Viewsonic
      • Internet:
      • ~3Mbps ADSL (TalkTalk Business)

    Re: Configuring virtual hosts in httpd.conf..

    Good shout, I've just done some reading on how Debian/Ubuntu have modularised Apache given the expansion they expect in the future.

    Virtual Host entries have been moved to my dedicated configuration files for each service I run (torrentflux/gallery2/wordpress/etc) and added to the aliases that are currently in those files - which are linked to in the conf.d folder - I think I'm on the right track now - according to this.

    I'm back to a nice blank httpd.conf again, yay!

    Cheers Hex, this way is nicer I guess - takes a bit longer to do, but I'd rather do it correctly!
    "If you're not on the edge, you're taking up too much room!"
    - me, 2005

  4. #4
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Configuring virtual hosts in httpd.conf..

    Torrentflux even has packages (which use that modularization to JustWork), so you can use those

  5. #5
    Network|Geek kidzer's Avatar
    Join Date
    Jul 2005
    Location
    Aberdeenshire
    Posts
    1,732
    Thanks
    91
    Thanked
    47 times in 42 posts
    • kidzer's system
      • Motherboard:
      • $motherboard
      • CPU:
      • Intel Q6600
      • Memory:
      • 4GB
      • Storage:
      • 1TiB Samsung
      • Graphics card(s):
      • BFG 8800GTS OC
      • PSU:
      • Antec Truepower
      • Case:
      • Antec P160
      • Operating System:
      • Windows 7
      • Monitor(s):
      • 20" Viewsonic
      • Internet:
      • ~3Mbps ADSL (TalkTalk Business)

    Re: Configuring virtual hosts in httpd.conf..

    Yeah, I installed Torrentflux from the repos, but it defaults to http://HOST/torrentflux - I've got my DynDNS pointing at my WAN IP address and NAT'ed to my router, so I've had to modify the tf one to work with torrentflux.mydnydns.dyndns.com instead of mydyndnds.dyndns.com/torrentflux.

    Just 'cause I think it looks nicer though!

    I did have tf-b4rt installed, but it complained I had the wrong version of the transmission client installed, even though I compiled/installed a version with their modded files - the regular Torrentflux works fine for me though, so no big loss there I don't think!
    "If you're not on the edge, you're taking up too much room!"
    - me, 2005

  6. #6
    The late but legendary peterb - Onward and Upward peterb's Avatar
    Join Date
    Aug 2005
    Location
    Looking down & checking on swearing
    Posts
    19,378
    Thanks
    2,892
    Thanked
    3,403 times in 2,693 posts

    Re: Configuring virtual hosts in httpd.conf..

    Apache themselves have modularised the hrttpd.conf file (you don't have to - you can but all the directives in one file, but it can make things easier to break them out).

    there are several ways of doing virtual hosts - you can separate them by IP address (if you have multiple IP addresses) or just by domain names 9I think you can do it by port number too) but domain name is easier.

    If you want a good generic book on Apache, "Apache, The Definitive Guide" published by O'Reilly is very good, but all the info you need is on the Apache web site (although not always easy to understand for a noob - (I speak from inexperience!)
    (\__/)
    (='.'=)
    (")_(")

    Been helped or just 'Like' a post? Use the Thanks button!
    My broadband speed - 750 Meganibbles/minute

  7. #7
    Network|Geek kidzer's Avatar
    Join Date
    Jul 2005
    Location
    Aberdeenshire
    Posts
    1,732
    Thanks
    91
    Thanked
    47 times in 42 posts
    • kidzer's system
      • Motherboard:
      • $motherboard
      • CPU:
      • Intel Q6600
      • Memory:
      • 4GB
      • Storage:
      • 1TiB Samsung
      • Graphics card(s):
      • BFG 8800GTS OC
      • PSU:
      • Antec Truepower
      • Case:
      • Antec P160
      • Operating System:
      • Windows 7
      • Monitor(s):
      • 20" Viewsonic
      • Internet:
      • ~3Mbps ADSL (TalkTalk Business)

    Re: Configuring virtual hosts in httpd.conf..

    Quote Originally Posted by peterb View Post
    If you want a good generic book on Apache, "Apache, The Definitive Guide" published by O'Reilly is very good, but all the info you need is on the Apache web site (although not always easy to understand for a noob - (I speak from inexperience!)
    I was looking at that book, O'Reilly seem to publish quite a few good books - Network Warrior is excellent.

    I did have a wander through the Apache Website Docs, they're full of info as you've said - but some of it doesn't seem brilliantly written - perhaps that is noob-ness making it seem that way though!
    "If you're not on the edge, you're taking up too much room!"
    - me, 2005

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. New HDD for VMWare Virtual Machines??
    By KingLouie3 in forum Help! Quick Relief From Tech Headaches
    Replies: 2
    Last Post: 04-12-2007, 01:39 AM
  2. Replies: 1
    Last Post: 02-11-2007, 12:37 PM
  3. Sharepoint
    By Vini in forum Software
    Replies: 9
    Last Post: 21-07-2005, 05:09 PM
  4. Apache Virtual Hosts and SSL certificates
    By DaBeeeenster in forum Software
    Replies: 9
    Last Post: 09-09-2004, 09:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •