How to Run a Free Web Server From Home on Windows or Linux with Apache « Null Byte :: WonderHowTo

Paying for web hosting isn't ideal in most situations. If you have your own website, hosting it yourself is very acceptable and easy to do, assuming your internet bandwidth permits. Most people want to run a personal site, nothing crazy, so hosting from home on low-bandwidth internet is actually a better solution in most cases.In thisNull Byte, I'm going to show you how to set up your own web server from home using the free Apache web server. You can be running Windows or Linux, because I will be covering them both!RequirementsA website to host (for testing purposes, not really needed if you just want to learn)Windows or LinuxStep1Enable Port ForwardingFirst, let's set up port forwarding so that you can access your website from an external network.ClickStart.In the search, typecmdand hitEnter. In the prompt, typeipconfig, and it will list your default gateway and IP address. Take note of both.Type192.168.1.1or the gateway you got from the previous step into the address bar of your internet browser.Log into your wireless router. Default username and passwords are usuallyadmin:password.ClickPort Forwardingsomewhere on the page. All of them look different, but here is how mine looked:ClickPort Forwardingon the router page.Set the host to your computer's IP address that we noted, and the port to80.Go toWhat Is My IP Addressand write down your IP. You will need this for reference later, as well as during the Windows install of Apache.Step2Register with DynDNSDynDNSwill allow us to have a domain to visit and remember for our webserver, rather than remembering our dynamic IP all of the time. Simply sign up for the service and fill in your IP, it's really straightforward.Step3Install the Apache Web ServerFollow the instruction set that corresponds to your platform.WindowsDownloadthe latest release of the Apache web server with an.msiextension.Run the installer.When presented with the option, make sure to install the Apache service.Open a command prompt and navigate to the Apachebindirectory underC:\Program Files\Apache Group.Run the service.httpd -k startLinuxRun your package manager and install Apache. I run Arch, so here was what I input:sudo pacman -S apacheRun the service.sudo rc.d start apacheVisit192.168.1.1to see the Apache test page.To add your website to your server, just put the files in/srv/www/.There you have it. Better than paying hosting for terrible service! You will also have complete control over your website, so it really benefits in the long run.Be a Part of Null Byte!Post to theforumsChat onIRCFollow onTwitterCircle onGoogle+Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicenseImage viadatacenterknowledgeRelatedHack Like a Pro:Linux Basics for the Aspiring Hacker, Part 11 (Apache Web Servers)How To:Linux Basics for the Aspiring Hacker: Configuring ApacheHack Like a Pro:Windows CMD Remote Commands for the Aspiring Hacker, Part 1How To:Turn a Pogoplug into a cheap Linux-based server with Apache, MySQL, and PHPHack Like a Pro:How to Use PowerSploit, Part 1 (Evading Antivirus Software)PHP for Hackers:Part 1, Introduction and Setting UpHack Like a Pro:How to Fingerprint Web Servers Using HttprintHow To:Turn a Microsoft Windows PC into a web server with XAMPPHack Like a Pro:How to Use Netcat, the Swiss Army Knife of Hacking ToolsHow To:Exploit Shellshock on a Web Server Using MetasploitHow to Hack Like a Pro:Getting Started with MetasploitHow To:Build a free SSL VPN on Linux or WindowsHow To:Exploit PHP File Inclusion in Web AppsHack Like a Pro:How to Spoof DNS on a LAN to Redirect Traffic to Your Fake WebsiteHack Like a Pro:How to Hack Web Apps, Part 7 (Finding Hidden Objects with DIRB)How To:Install Joomla 1.5 on Windows with an Apache ServerHack Like a Pro:Metasploit for the Aspiring Hacker, Part 13 (Web Delivery for Windows)How To:Create a Free SSH Account on Shellmix to Use as a Webhost & MoreNews:Anonymity, Darknets and Staying Out of Federal Custody, Part Three: Hidden ServicesNews:Catch Creeps and Thieves in Action: Set Up a Motion-Activated Webcam DVR in LinuxHow To:Turn Your House Lights On & Off Using the InternetHow To:Use Cygwin to Run Linux Apps on WindowsHow To:Stream Media to a PS3 or Xbox 360 from Mac & Linux ComputersHow To:Run Windows from Inside LinuxWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)Hack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Remotely Control Computers Over VNC Securely with SSHGoodnight Byte:HackThisSite Walkthrough, Part 10 - Legal Hacker TrainingHow To:Recover Deleted Files in LinuxHow To:Run an FTP Server from Home with LinuxHow To:Create an SSH Tunnel Server and Client in LinuxHow To:Scan for Viruses in Windows Using a Linux Live CD/USB