How to access the server from other computers on a local network, how to connect to internet through Apache, save web pages in cache and finally serve your web pages on the Internet and allow access to the server from the outside.
There are several types of web servers, Apache is an open source software, free to use and fully configurable, is now the most used in the network, either Linux or Windows. When installed on our PC will have a complete server with all the requirements to run locally.
1 - Try and see web pages as they truly are to be displayed from the internet before uploading to a host or server on the network. Useful and necessary if you have or you will create your site however modest it may be.
2 - Create Virtual Host module by multiple websites on our PC, we can download with wget and access them like on the net but this time locally.
3 - able to see locally made web pages in PHP.
4 - Serve our website pages or directly to the Internet, you can access and connect every person from outside, in this case obviously the server performance will be limited while we run the PC and the possibilities of our connection. It can be a very encouraging experience for any fan, this possibility has the advantage that it is not necessary to rely on any company or remote server to upload content to the network we want to show. It's like riding a small radio station and start broadcasting (similarity) but in this case the scope is global.
5 - can act as an intermediary between our computer and internet which gives us several advantages in the field of security.
6 - Through internet it can serve several computers connected in a local network.
7 - It is possible to activate a module that allows to cache all pages loaded which will improve the performance of our navigation.
Create two folders on drive C, the first and second name servidor_web Apache. Unzip the downloaded file and run it, follow the installation steps and data that ask you just pick the destination of the facility, which will be the folder you created in C: \ Apache, the other data leave them the default for configure later.
the installed program creates an icon in the notification area that lets you: start, stop and restart Apache, you should keep in mind that any changes you make to the configuration file will not take effect until you restart the server.
can download Notepad + + from here.
You have two options here:
1 - First option, the simplest, download at the following link a copy of the httpd.conf file, unzip it, copy it or move it to the C: \ Apache \ conf and replaces the original file, and have ready to run the server.
2 - The alternate advanced but not difficult, open the httpd.conf file and manually edit the lines indicated:
All Lines beginning with # are comments in each section explains the various options but are in English.
1 - The server will receive requests only from the same PC: Listen localhost: 80
2 - receive requests other machines on a local network: Listen 80
DocumentRoot "C :/ servidor_web"
<Directory "C:/servidor_web">
Any problems will be reflected in the server logs stored in C: \ Apache \ logs, you can open with notepad, in access.log file records all disclosures made to the server, both your PC and Internet, in error.log records all operation errors, analyze them regularly will help a lot.
To know the IP address need only open CMD window by typing Start> CMD, type in the window that opens IPCONFIG / ALL and press Enter, find the line Gateway, then the number is the IP address of the proxy.
If the server listen on a different port to 80 (default) writes: "ip address: port", eg 192.168.1.3:8080
In case of conflicts in trying to connect to a computer using a local network, check the following:
• The IP address the computer you want to connect.
• If Apache is listening on the port to which the request is made.
• If the Windows firewall is blocking the connection.
• If you receive an error message with code 403 means that there are no with the necessary permissions to access the directory, then establécelo as follows: <Directory "path to directorio"> Options Indexes FollowSymLinks AllowOverride None Order allow, deny Allow from all </ Directory>
LoadModule proxy_module modules / mod_proxy.so
modules LoadModule proxy_http_module / mod_proxy_http.so
then adds at the end of file line: ProxyRequests On
Close and save the changes.
Access Internet Options via Control Panel, click the Connections tab LAN Settings button and check the box Use a proxy server, type in Address: 127.0.0.1 and Port: 80 or you will be using. OK in all windows. Restart the server.
This applies if you use Internet Explorer and Google Chrome, if you use Firefox the above options you have to enter them in:
Options> Settings> Set as Firefox connects to Internet.
From now on all your connection goes by Apache, whether local or external address.
Create a folder on drive C CacheRoot name, which will store the files in the cache, you can create on another drive, then you would have to indicate their path in the configuration file.
In the httpd.conf file uncomment (remove the #) the line:
LoadModule expires_module modules / mod_expires.so
And add the following lines:
LoadModule cache_module modules / mod_cache.so
disk_cache_module LoadModule modules / mod_disk_cache . so
copy and paste the following lines of code at the bottom:
CacheRoot c :/ CacheRoot
# CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
86400 CacheDefaultExpire
CacheIgnoreNoLastMod On
CacheStoreNoStore On
CacheStorePrivate On
CacheEnable disk http:// *
Options Indexes FollowSymLinks
AllowOverride None
Order allow, deny
Allow from all
</ Directory>
ExpiresActive on
ExpiresDefault A604800
</ IfModule>
Read the following pages in the manual folder: C :/ Apache / manual / mod / mod_disk_cache.html C :/ Apache / manual / mod / mod_expires.html
2 - You have an internet connection dynamics, the most common means that each time you connect your service provider Internet you are assigned a different IP address. In this case each time you need to install in your httpd.conf file enter the IP address assigned at the time, which is quite uncomfortable.
3 - The other option is to access the DynDNS service offering that will synchronize the IP address you assigned to your server. Read more below an extract from Wikipedia.
If you configured the server name added to the end of your httpd.conf file the following line:
Listen 80 to access through port 80 which is the default web browsing.
There are ISPs that close this port, you can try if that If yours is accessing this page: https://www.dyndns.com/support/tools/openport.html entering your IP address and port, if so change testing another port, eg 8080 and specify it in the httpd.conf file like this: Listen 8080 is all, and if they work for outside access to your page, they should write to the browser: tudireccionIP: 8080 / If you installed the DynDNS update client would not necessarily be the IP address if the address assigned by the service.