Server Administration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesServer Administration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old November 12th, 2008, 04:19 PM
Osiris Osiris is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2008
Location: Sussex
Posts: 566 Osiris User rank is Private First Class (20 - 50 Reputation Level)Osiris User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 19 h 54 m 33 sec
Reputation Power: 2
Apache - Access issues?

So what I want to do is to access my home Apache server from an alternative computer (specifically my work one)

Is this possible? I've tried looking on google, but can't seem to find any relevant threads/tutorials.

I'm guessing that I'll need access to the router to do so? (if so I'm screwed lol)
__________________
~~==~~ Whoever said nothing is impossible never tried pushing a revolving door ~~==~~

Reply With Quote
  #2  
Old November 12th, 2008, 07:09 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,937 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 5 Days 1 h 54 m 18 sec
Reputation Power: 4
You probably would need access to the router so you can setup the port forwarding. Other than that, you would just need to edit the apache httpd.conf to allow connections from outside sources and restart apache.

Reply With Quote
  #3  
Old November 13th, 2008, 03:37 AM
Osiris Osiris is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2008
Location: Sussex
Posts: 566 Osiris User rank is Private First Class (20 - 50 Reputation Level)Osiris User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 19 h 54 m 33 sec
Reputation Power: 2
I couldn't see any line in httpd.conf regarding this, maybe I missed it?

Reply With Quote
  #4  
Old November 15th, 2008, 03:53 AM
gwynblade gwynblade is offline
Registered User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Oct 2008
Location: Ukraine
Posts: 17 gwynblade User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 33 m 2 sec
Reputation Power: 0
Send a message via AIM to gwynblade
If http://localhost shows the default Apache page or any configured site it's not an Apache problem, you should check the network configuration.

Reply With Quote
  #5  
Old November 16th, 2008, 04:34 AM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,937 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 5 Days 1 h 54 m 18 sec
Reputation Power: 4
it might be an apache problem if it is set to deny from all allow from 127.0.0.1 meaning that it will only allow access from localhost.

Reply With Quote
  #6  
Old November 16th, 2008, 06:00 AM
Osiris Osiris is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2008
Location: Sussex
Posts: 566 Osiris User rank is Private First Class (20 - 50 Reputation Level)Osiris User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 19 h 54 m 33 sec
Reputation Power: 2
yea, I think I need to have port forwarding set up by looks of it, damn (no-one has access to the router in the property lol)

Reply With Quote
  #7  
Old November 16th, 2008, 01:35 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,937 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 5 Days 1 h 54 m 18 sec
Reputation Power: 4
You could try to use something like UPnP port forwarding. Basically a program requests access to a port forwarding and if the router supports it, it is granted. I just did a small search and found this that looks like a way to work use upnp. It is most commonly (nowadays) used with things like peer to peer protocols to request ports to open when they need to get out.

Reply With Quote
  #8  
Old November 16th, 2008, 04:49 PM
Osiris Osiris is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2008
Location: Sussex
Posts: 566 Osiris User rank is Private First Class (20 - 50 Reputation Level)Osiris User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 19 h 54 m 33 sec
Reputation Power: 2
Thats brilliant Llama! Works perfectly! (Well I've connected from my computer and laptop through external IP address anyway, the real test will be tomorrow at work).

What sort of security issues am I raising if I leave this running all day? The server is obviously password protected, howver passwords can be broken, there is nothing of value on the server itself, however as the server is running from my computer, that obviously has important stuff on it.

My firewall asks for confirmation of every new thing really (running comodo) so I am pretty confident that any external access attempts would not get through without my auth, but you never know.

Reply With Quote
  #9  
Old November 17th, 2008, 01:51 AM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,937 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 5 Days 1 h 54 m 18 sec
Reputation Power: 4
well you can also do like I said above and use apache to limit access to specific IP addresses. Most offices have a static IP address so if you find that out then you could add that IP to an allow list. Here is how part of my httpd.conf looks to allow access to just my work IP and my localhost.

Code:
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs">
    #
    # 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://httpd.apache.org/docs/2.2/mod/core.html#options
    # 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.
    #
    Order deny,allow
    deny from all
    allow from 127.0.0.1
    #full IP is in my config, added 0 for this post.
    allow from 66.150.0.0
</Directory>

notice the end that says:
Code:
    Order deny,allow
    deny from all
    allow from 127.0.0.1
    #full IP is in my config, added 0 for this post.
    allow from 66.150.0.0

That basically means that deny comes before allow statements. The allow and deny statements overwrite in that order. meaning that if the order was allow,deny then I would be allowing local and work but then deny would block them all. order by deny,allow will deny everyone then only allow the listed IP's.

*edit: The httpd.conf is found in the conf directory under apache.

Reply With Quote
  #10  
Old November 18th, 2008, 04:04 PM
Osiris Osiris is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2008
Location: Sussex
Posts: 566 Osiris User rank is Private First Class (20 - 50 Reputation Level)Osiris User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 19 h 54 m 33 sec
Reputation Power: 2
OK, thanks for the help Llama, and that is working... mostly. If I connect through my external IP address it works fine, if I try going through my internal IP address it does not, it comes up with an "You don't have permission to access / on this server." message

However both my external and internal IP address are allowed, and I know I've entered them correctly. Any ideas?

Reply With Quote
  #11  
Old November 18th, 2008, 04:38 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,937 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 5 Days 1 h 54 m 18 sec
Reputation Power: 4
Just comment out the IP addresses and add "Allow from all", restart apache and then go to the server and view a phpinfo() page or echo out $_SERVER['REMOTE_ADDR'] to get the IP address that is connecting. Add that into the apache config file and remove allow from all, uncomment the other IPs and restart apache again.

You probably just don't have all the IP addresses added. Also, you can put only a partial IP address if you wanted. Like if you wanted to allow access to other people on the network, but restrict access to only people on the network you can use something like 192.168.1 and that will allow everyone from 192.168.1.1-255

Reply With Quote
  #12  
Old November 19th, 2008, 03:02 AM
Osiris Osiris is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2008
Location: Sussex
Posts: 566 Osiris User rank is Private First Class (20 - 50 Reputation Level)Osiris User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 19 h 54 m 33 sec
Reputation Power: 2
ah, good plan!

I'll prob go for the second option though, to allow my other comps to connect etc. I thought there must be a way, but I was thinking something like 192.168.1.# would do the trick

Reply With Quote
  #13  
Old November 19th, 2008, 01:14 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,937 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 5 Days 1 h 54 m 18 sec
Reputation Power: 4
# is a comment.

here is the manual page that talks about access:
http://httpd.apache.org/docs/2.0/mo...cess.html#allow

If you want you can also use apache to require a username and password, allow access to an IP range or to a specific user agent (browser name). It describes more stuff like that on the manual page.

Reply With Quote
  #14  
Old November 19th, 2008, 07:48 PM
Osiris Osiris is offline
Contributing User
Codewalkers Novice (500 - 999 posts)
 
Join Date: May 2008
Location: Sussex
Posts: 566 Osiris User rank is Private First Class (20 - 50 Reputation Level)Osiris User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 2 Days 19 h 54 m 33 sec
Reputation Power: 2
wierd, If i echo out $_SEVER[REMOTE_ADDR] like you said I get 127.0.0.1, however in the httpd.conf file I changed the IP range to 192.168.1, which the IP given to the computer is included, and that would be connecting through one of the IPs in the range 192.168.1.1-255, yet still echos 127.0.0.1?

Reply With Quote
  #15  
Old November 21st, 2008, 04:57 PM
IAmALlama IAmALlama is offline
Me
Click here for more information. Click here for more information
Click here for more information
 
Join Date: Apr 2007
Location: Seattle, WA
Posts: 1,937 IAmALlama User rank is Private First Class (20 - 50 Reputation Level)IAmALlama User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 1 Week 5 Days 1 h 54 m 18 sec
Reputation Power: 4
that would depend on how you are connecting to the computer. If you connect through localhost, it is always going to be 127.0.0.1. If you connect through the internal IP (ie: 192.168.1.5), you will get whatever your internal IP is and if you connect through an external IP, you will get whatever your external IP is.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesServer Administration > Apache - Access issues?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek