NMY
By:
NMY

configure LAMP for website on intranet instead of its default setting on internet

June 21, 2015 803 views
Linux Basics MySQL

Hello, I have installed the (LAMP) following this tutorial LAMP
I am new to Linux and all other staff its cool and I had made my choice to move in
so I intend to build a website on an intranet in two building network
our ip range 172.16.1.255
to install the LAMP I need the internet so I connect with broadband connection which gives me an ip 10.10.10.152
in apache2 installing step in checking apache2 ubuntu default page it doesnt work on my lan ip4 which is 172.16.1.94 and work on 10.10.10.152 which is for broadband connection and not all pc are connected on broadband
I need to reconfigure on the LAN ip range so other pcs can see my website

thank you all in advance
best regards
NMY

1 Answer

You can force Apache to bind to a specific IP by configuring it in a Listen directive. On Ubuntu, you would edit /etc/apache2/ports.conf and adjust it so that it the IP address precedes the port:

Listen 172.16.1.94:80

<IfModule ssl_module>
        Listen 172.16.1.94:443
</IfModule>

<IfModule mod_gnutls.c>
        Listen 172.16.1.94:443
</IfModule>
Have another answer? Share your knowledge.