Jump to content
xisto Community
Sign in to follow this  
SaNJ

A Web Server On Lan

Recommended Posts

Hey friends ..I m new to the forum and would like to ask for help. I have just started writing script for web pages.I can make fairly good pages using HTML, PHP and for the backend database I use MySQL. I live in a college hostel and my computer is connected to a LAN having about 300 computers.What I want is to make my web pages available to the LAN users...when I try to do so a message appears..u don't have permission to view <filename> on this server.I m doing this just for curiosity and fun.I think this would be quit simple.....I don't know much about networking... So what are the things do I need to configure...what I have is ...Apache 2.2.8 PHP 5.2.6 MySQL 5.0.51b Windows XP SP2

Share this post


Link to post
Share on other sites

Thanks sonesay, bsdpowa, samlockart......for writingComputers on the LAN are same like mine ....with SP2What I write on others computers on LAN in the URL is something like this.....//190.168.0.33/filename.php 190.168.0.33 is my IP adress on LAN and what get in return is a HTTP 403 forbidden error....You don't have permission to access /index.php on this server.I have seen some intranet...using this techniqueHere is the httpd.conf

httpdt.txt

Edited by SaNJ (see edit history)

Share this post


Link to post
Share on other sites

Just type the IP address / index page or the Index page you have used

i think you have not configured the httpd.conf file properly...because there should not be any permission error on LAN...

Check your windows firewall... because i think that is the only thing stopping anyone from accessing your computer...

if you are using a router to connect to the LAN which has a built in firewall then you need to configure it...if you are using switches or hubs then just the OS firewall is between you and the LAN users

Edited by OpaQue (see edit history)

Share this post


Link to post
Share on other sites

Thanks klusk ....I have already tried ...what u said ...but the result was sameMy windows firewall is off....and I have configured my bitdefender firewall to allow lan requests..I have even tried with both the firewall disabled...still the same..I think the problem is with the httpd.conf....should I change the port no. to which the server listens...I have uploaded the httpd.conf file in the above post ....can u help me out with it

Share this post


Link to post
Share on other sites

It doesn't look like a firewall problem to me because you are getting the 403 error which is return by the web server so it looks more like a permission error. Can you view the site locally with any problems? was there any changes you made to the config file? Any other changes you may have made that may affect it? Check the permissions on the files/folders as well of your www root. I cant think of anything else that could be affecting it.

<Directory "c:/wamp/www/"> #
# Possible values for the Options directive are "None", "All",
# or any combination of:
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important. Please see
# http://forums.xisto.com/no_longer_exists/
# for more information.
#
Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride all

#
# Controls who can get stuff from this server.
#

# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from 190.168.0.1

</Directory>


I don't know much about the http.cofig and configuring blocks but that last few lines does it do anything?
Edited by sonesay (see edit history)

Share this post


Link to post
Share on other sites

Hi, if you are using windows and apache, first set your files to read for all users, then make the executable as the script need to execute on the server.
Then comment the last lines of the config file, the ones that say "no remove".

## AllowOverride controls what directives may be placed in .htaccess files.# It can be "All", "None", or any combination of the keywords:# Options FileInfo AuthConfig Limit#AllowOverride all## Controls who can get stuff from this server.## onlineoffline tag - don't remove#Order Deny,Allow							 #Deny from all#Allow from 127.0.0.1#Allow from 190.168.0.1</Directory>
With that you are letting the other computers in the lan to access the files in the web server.
After doing the things i mentioned the computers in the lan should be able to connect.
Good luck.!!

Regards, Seba

Share this post


Link to post
Share on other sites

your firewall suggestion

A Web Server On Lan

 

Replying to klusk

Your firewall suggestion is great. That helped me solve my own little problem. Just by making a home network by the wizard is not sufficient, you have to down the firewall or make an exception. Thanks for the same

 

-reply by Amsang

Share this post


Link to post
Share on other sites

I had similar problem. This may help. Mine was a firewall and access right problem. Change or fine tune these in Windows:* Right click the directory/folder that holds your files, select Properties.* Check out the "Sharing" tab.* Check out the "View .. Firewall setting" option.* In the firewall dialogue box, check out the Exception tab. * Under each Exception, check out the "Edit" and "Change Scope" option.

Share this post


Link to post
Share on other sites

Access right problem?

A Web Server On Lan

 

 

I had similar problem. This may help. Mine was a firewall and access right problem. Change or fine tune these in Windows:

 

* Right click the directory/folder that holds your files, select Properties.

 

* Check out the "Sharing" tab.

 

* Check out the "View .. Firewall setting" option.

 

* In the firewall dialogue box, check out the Exception tab.

 

* Under each Exception, check out the "Edit" and "Change Scope" option.

Share this post


Link to post
Share on other sites
permissionA Web Server On Lan

here is what I have just done.

Go to your firewall and on the advanced tab allow the web server to listen on r computer. Then go to your http.Config file and  insert this line in its appropraite position

Allow from All

then restart  your apache server and try again. I think this should work 

-reply by henok

Share this post


Link to post
Share on other sites

Here is the solution for the access forbidden error:

Go to httpd.Conf file of your apache  and find "Allow from 127.0.0.1"

and once you reached the line with the code as mentioned below comment the links using "#" as I did in he below code. Restart your apache server and that's it.

 Httpd.Conf File

 # Controls who can get stuff from this server.# onlineoffline tag - don't remove#   Order Deny,Allow# Deny from all   Allow from 127.0.0.1

Best Regards

Muhammed Ameen

-reply by Muhammed Ameen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.