How To Use Your PC as a Web Server
When you pay for web hosting, you are immersed in a system that by its nature will limit much of what you can do. Web hosting companies now place arbitrary rules of their customers to get them to pay additional fees, the price for them to offer this service will not increase if you use it. IRC is streaming content, tracker torrent, ssh access, pornography, software piracy, phishing sites, Wikileaks mirrors and through information used by companies in their voracious appetite for ever greater amounts of capital and control. Decentralized control of information is the first step in the democratization of information, while technological and inherently political process that began with the creation of the first redundant networking systems, and processes whose existence is threatened if "people like us", those who have the means to defend what remains muted by apathy.
That's why I wrote the following tutorial on how to subvert the treated control in the enterprise server hosting and server farms massive business.
First, note that this tutorial is focused on Ubuntu, however, no concrete information on the Ubuntu, Fedora does not apply to follow the same instructions for Fedora users (ie, Fedora, CentOS, RHEL). Of course, if you are not in Fedora and Ubuntu, I can not promise that this information applies. If you have Fedora, make sure you're logged on as administrator. Ubuntu you need to use sudo.
First, if you're on Ubuntu, do the following:
Then enter the sudo password. This will give you the root end of the year. Fedora users will not have to worry about, and can change the rotor in the normal way.
Initially, we recommend you install Apache. Apache is the actual software, which serves people who ask to see the page on the server. This is one (and very swollen, but that's another topic) very powerful, and is by far the most popular web server software in the universe. Well, is the most popular on Earth, however, really can not say what software they are using the server, the Andromeda galaxy. In any case, just install the Apache open a command line and not as follows:
apt-get install apache2
Fedora / CentOS / RHEL:
* Httpd is the name of Apache daemon in Red Hat
It is unfortunate that the Debian-based systems (eg Ubuntu) is called apache2 instead of just Apache, but no matter. Also, if you're wondering why Red Hat called httpd, d means devil, and the HTTP protocol is
uses the Web to transfer data. Let's move!
To do this, if you're in Ubuntu:
gedit / etc/apache2/ports.conf
Now that you have this file open, edit the part that says
NameVirtualHost *: 80
To say that followingCODE:
NameVirtualHost *: 9001
Finally go to file / etc/apache2/sites-enabled/000-default with gedit and change " <VirtualHost *:80> "
saying " <VirtualHost *:9001> "
Then save the file and exit gedit. Run the following command:
service apache2 again
If you are on Fedora, it is much easier to just do the following:
gedit / etc / httpd / httpd.conf
Replace the part that says "Listen 80" to say "Listen 9001"
service httpd restart
Why is port 9001 you ask? Well, I tell you, though: because many ISPs block port 80 incoming connections to its customers. Port 80 may or may not use the Web server port. Go try it, if you wish, if it works you do not need to specify the port number, you access the site later.
You're almost done! Well, technically, is "fact" that the team is now a web server, but there are some data you would like to know. To begin, go ahead and point your browser to
WOAH! But you probably want some 'content, am I right? Perform the following commands:
[Code] echo "Hello, World"> / var / www / index.html
If you have Fedora, do "service httpd again" and not apache2.
Now open again the same URL (localhost: 9001) and Viola! My website, which can be accessed by friends of the victims' and your IP address. Just point your browser to the IP ": 9001" at the end and you arrive at your site. For example, I simply set the server up to this moment to reach https://220.127.116.11:9001/ (Do not bother trying to go, no way my IP address is still, by the time you read this).
If not, and there are several computers on the network, you will probably have to implement the so-called "port forwarding". When a packet (a piece of information being given network) access to the IP address of content requests, does not know what to ask to the computer port 80 (or 9001). You just need to change the router settings. To access the settings panel of the router, connect an IP gateway is in column the last line of the output of 'route-n "command (it will be something to 192.168.1.1). Details vary from router to another, so if you are still confused about google "port forwarding" + type of router.
To add pages to your site, simply put in the / var / www. This file is the "root" of your site.
As you probably know the standard Web page that loads when people enter your site is called either index.html or index.php, depending on whether it is PHP code in it or not.