Overclock.net › Forums › Specialty Builds › Servers › Possible to host two different websites on one server?
New Posts  All Forums:Forum Nav:

Possible to host two different websites on one server?

post #1 of 12
Thread Starter 
One LAN, one external IP, one internal IP, one computer. Is it possible to host two different websites on the same PC?
Edited by kiwiasian - 10/23/11 at 2:01pm
post #2 of 12
In a nutshell yes you can host not 1, not 2, but many and i do mean many. it just depends on the resources required for each etc... They can even use the same IP if I remember right. been a while since I set up a web server. I would need to double check but I think coming into the server they are assigned different port numbers and that is how it is identified. Have to double check though.
    
CPUMotherboardGraphicsGraphics
Intel Core i7 5960X RAMPAGE V EXTREME ASUS STRIX GeForce GTX 980TI Overclocked 6 GB D... ASUS STRIX GeForce GTX 980TI Overclocked 6 GB D... 
GraphicsRAMHard DriveHard Drive
ASUS STRIX GeForce GTX 980TI Overclocked 6 GB D... Corsair Dominator Platinum Series 64GB DDR4 DRA... SAMSUNG 850 EVO 2.5" 1TB SATA III 3-D Vertical ... ADATA XPG SX930 2.5" 480GB SATA III MLC Interna... 
Hard DriveCoolingOSMonitor
Kingston SSDNow V300 Series 2.5" 240GB SATA III... XSPC RayStorm Extreme Universal CPU Watercoolin... Windows 10 Pro Acer Predator 34-inch Curved UltraWide QHD (344... 
MonitorMonitorKeyboardPower
Acer Predator 34-inch Curved UltraWide QHD (344... Acer Predator 34-inch Curved UltraWide QHD (344... Razer BlackWidow Chroma  Corsair AXi Series AX1500i 
CaseMouseMouse Pad
Corsair Obsidian 900D Razer Naga Epic Chroma  Razer Vespula 
  hide details  
Reply
    
CPUMotherboardGraphicsGraphics
Intel Core i7 5960X RAMPAGE V EXTREME ASUS STRIX GeForce GTX 980TI Overclocked 6 GB D... ASUS STRIX GeForce GTX 980TI Overclocked 6 GB D... 
GraphicsRAMHard DriveHard Drive
ASUS STRIX GeForce GTX 980TI Overclocked 6 GB D... Corsair Dominator Platinum Series 64GB DDR4 DRA... SAMSUNG 850 EVO 2.5" 1TB SATA III 3-D Vertical ... ADATA XPG SX930 2.5" 480GB SATA III MLC Interna... 
Hard DriveCoolingOSMonitor
Kingston SSDNow V300 Series 2.5" 240GB SATA III... XSPC RayStorm Extreme Universal CPU Watercoolin... Windows 10 Pro Acer Predator 34-inch Curved UltraWide QHD (344... 
MonitorMonitorKeyboardPower
Acer Predator 34-inch Curved UltraWide QHD (344... Acer Predator 34-inch Curved UltraWide QHD (344... Razer BlackWidow Chroma  Corsair AXi Series AX1500i 
CaseMouseMouse Pad
Corsair Obsidian 900D Razer Naga Epic Chroma  Razer Vespula 
  hide details  
Reply
post #3 of 12
    
CPUMotherboardGraphicsRAM
Intel Overdrive 486DX4 100Mhz Digital Venturis 466 S3 Trio 32 1MB 68MB 72 Pin SIMMs 
Hard DriveOptical DriveOSMonitor
1.2Gb & 270Mb 32X CD-ROM Windows 98 SE LG 23" Flatron 
KeyboardPowerCaseMouse
Microsoft PS/2 Lite-On Digital Venturis 466 Logitech PS/2 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel Overdrive 486DX4 100Mhz Digital Venturis 466 S3 Trio 32 1MB 68MB 72 Pin SIMMs 
Hard DriveOptical DriveOSMonitor
1.2Gb & 270Mb 32X CD-ROM Windows 98 SE LG 23" Flatron 
KeyboardPowerCaseMouse
Microsoft PS/2 Lite-On Digital Venturis 466 Logitech PS/2 
  hide details  
Reply
post #4 of 12
Quote:
Originally Posted by jwalker150 View Post
In a nutshell yes you can host not 1, not 2, but many and i do mean many. it just depends on the resources required for each etc... They can even use the same IP if I remember right. been a while since I set up a web server. I would need to double check but I think coming into the server they are assigned different port numbers and that is how it is identified. Have to double check though.
It's not ports, it has to do with the header tag in your packets. When a webserver receives a packet from a client ( when said webserver has multiple websites set up) it looks at the host header for what site to direct it to. For example I have 4 websites hosted on my homeserver. In IIS I configured it so if it receives a request for example.com, it goes to folder A. If it receives a request for stats.example.com, it goes to folder B. You basically do this for a larger install with multiple websites. Every site on a server could resolve to the same IP. With apache in linux, it's easy to make new conf files for each site, and just add line into your apache conf to read a folder of the individual site configurations.

Quote:
Originally Posted by killabytes View Post
And to be more specific....
http://httpd.apache.org/docs/2.0/vhosts/name-based.html
Edited by herkalurk - 10/5/11 at 5:18pm
post #5 of 12
IIS has this functionality as well: http://technet.microsoft.com/en-us/l...95(WS.10).aspx

I use Apache2 and VirtualHosts for my personal system (5 sites).
Edited by D-EJ915 - 10/5/11 at 6:39pm
Kanna
(13 items)
 
Mitty
(16 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7-7820X Asrock X299 OC Formula e-vga GTX 1080 Ti Founder's Edition G.Skill DDR C14 3200MHz XMP 4x8GB 
Hard DriveCoolingOSMonitor
Intel P3520 NVMe PCIE AIC 1.2TB NZXT Kraken 62 Windows 10 x64 Asus PA329Q 32" 4k 60Hz 
KeyboardPowerCaseMouse
Corsair K70 RGB Lux Seasonic X-1250 1250 Watt PSU NZXT S340 Logitech G600 
Audio
HDMI to my Yamaha CX-A5000 preamplifier and stu... 
CPUMotherboardGraphicsGraphics
Intel i7-3930k Asrock Fatal1ty X79 Champion EVGA GTX 480 EVGA GTX 480 
GraphicsRAMHard DriveOptical Drive
EVGA GTX 480 Mushkin Redline WD Velociraptor Asus DVD±RW 
CoolingOSMonitorKeyboard
EK 2011 waterblock + 2x140 rad + respump Windows 7 Pro x64 Dell U2711 IBM Model M 
PowerCaseMouseAudio
Seasonic X-1250 Fractal ARC MIDI Logitech G9X Asus Xonar DX 
  hide details  
Reply
Kanna
(13 items)
 
Mitty
(16 items)
 
 
CPUMotherboardGraphicsRAM
Intel i7-7820X Asrock X299 OC Formula e-vga GTX 1080 Ti Founder's Edition G.Skill DDR C14 3200MHz XMP 4x8GB 
Hard DriveCoolingOSMonitor
Intel P3520 NVMe PCIE AIC 1.2TB NZXT Kraken 62 Windows 10 x64 Asus PA329Q 32" 4k 60Hz 
KeyboardPowerCaseMouse
Corsair K70 RGB Lux Seasonic X-1250 1250 Watt PSU NZXT S340 Logitech G600 
Audio
HDMI to my Yamaha CX-A5000 preamplifier and stu... 
CPUMotherboardGraphicsGraphics
Intel i7-3930k Asrock Fatal1ty X79 Champion EVGA GTX 480 EVGA GTX 480 
GraphicsRAMHard DriveOptical Drive
EVGA GTX 480 Mushkin Redline WD Velociraptor Asus DVD±RW 
CoolingOSMonitorKeyboard
EK 2011 waterblock + 2x140 rad + respump Windows 7 Pro x64 Dell U2711 IBM Model M 
PowerCaseMouseAudio
Seasonic X-1250 Fractal ARC MIDI Logitech G9X Asus Xonar DX 
  hide details  
Reply
post #6 of 12
Thread Starter 
So all I have to do is edit the http.conf?
post #7 of 12
As stated, configure virtual hosts in Apache.
You can also configure multiple sites on the same IP address using this (examines the DNS name sent in the HTTP request).
Waiting on X399
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II B57 @ X4 3.9 Gigabyte 790FXTA-UD5 Sapphire Radeon 290 8 GB G.Skill 2133 
Hard DriveCoolingOSKeyboard
250 GB 840 EVO Noctua NH-D14 Windows 10 Logitech K350 
PowerCaseMouseMouse Pad
Seasonic x750 Corsair 600T Logitech G100s Razer Goliathus Speed 
Audio
Plantronics Gamecom 788 
  hide details  
Reply
Waiting on X399
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II B57 @ X4 3.9 Gigabyte 790FXTA-UD5 Sapphire Radeon 290 8 GB G.Skill 2133 
Hard DriveCoolingOSKeyboard
250 GB 840 EVO Noctua NH-D14 Windows 10 Logitech K350 
PowerCaseMouseMouse Pad
Seasonic x750 Corsair 600T Logitech G100s Razer Goliathus Speed 
Audio
Plantronics Gamecom 788 
  hide details  
Reply
post #8 of 12
Hi,

You can have many sites on a single, as long as the computer serving the pages sustains the load of incoming requests.

Configure Apache vhosts and that's it. Simple.
Also remember that when using https the only limitation is that every site Must have a Unique IP.

That's the only limitation regarding hosting.
Also of course a single computer can have as many ip's as assign to your connection.


Regards.
    
CPUMotherboardGraphicsRAM
AMD AMD Phenom II X4 955 - 3,2 GHz Asus M4A88T-V EVO/USB3 Sapphire Radeon HD 6870 - 1 GB GDDR5 Corsair Memória PC XMS3 2x4 GB DDR3 1333 
Hard DriveOptical DriveOSMonitor
2X Hitachi Deskstar 7K1000.C 1TB DVD-WR Asus Linux OpenSuSE 11.4 Asus VW247H 
KeyboardPowerCaseMouse
HP keyboard. Black keys. Antec PC TruePower New TP-750 Antec PC Sonata III Black Microsoft Explorer II wireless Old but effective 
Mouse Pad
Custom made with Photo. 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
AMD AMD Phenom II X4 955 - 3,2 GHz Asus M4A88T-V EVO/USB3 Sapphire Radeon HD 6870 - 1 GB GDDR5 Corsair Memória PC XMS3 2x4 GB DDR3 1333 
Hard DriveOptical DriveOSMonitor
2X Hitachi Deskstar 7K1000.C 1TB DVD-WR Asus Linux OpenSuSE 11.4 Asus VW247H 
KeyboardPowerCaseMouse
HP keyboard. Black keys. Antec PC TruePower New TP-750 Antec PC Sonata III Black Microsoft Explorer II wireless Old but effective 
Mouse Pad
Custom made with Photo. 
  hide details  
Reply
post #9 of 12
Thread Starter 
Alright so I just tried this today and it didn't work. I added both my domains to the httpd.conf file. After I restarted the server, Apache refused to start and connections to both servers just timed out.

Code:
Listen 80
NameVirtualHost *

    <VirtualHost *>
    ServerName www.domain1.com
    DocumentRoot /www/domain1
    </VirtualHost>

    <VirtualHost *>
    ServerName www.domain2.com
    DocumentRoot /www/domain2
    </VirtualHost>
Ideas?
post #10 of 12
What error did you receive when you tried to start apache?
Waiting on X399
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II B57 @ X4 3.9 Gigabyte 790FXTA-UD5 Sapphire Radeon 290 8 GB G.Skill 2133 
Hard DriveCoolingOSKeyboard
250 GB 840 EVO Noctua NH-D14 Windows 10 Logitech K350 
PowerCaseMouseMouse Pad
Seasonic x750 Corsair 600T Logitech G100s Razer Goliathus Speed 
Audio
Plantronics Gamecom 788 
  hide details  
Reply
Waiting on X399
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II B57 @ X4 3.9 Gigabyte 790FXTA-UD5 Sapphire Radeon 290 8 GB G.Skill 2133 
Hard DriveCoolingOSKeyboard
250 GB 840 EVO Noctua NH-D14 Windows 10 Logitech K350 
PowerCaseMouseMouse Pad
Seasonic x750 Corsair 600T Logitech G100s Razer Goliathus Speed 
Audio
Plantronics Gamecom 788 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Servers
Overclock.net › Forums › Specialty Builds › Servers › Possible to host two different websites on one server?