image
image
Ticket Options
Question Details
TICKET ARCHIVE -> Tiger Webserver Url
neosable - Jun 28, 2005 - 8:12 pm
image
image
Hi I activated the web server in tiger and i can acces my webpages by typing "http://localhost" but the folders url changes to somehting like "http://myname.local/folder" how can i avoid this?

thx
adamski - Jun 28, 2005 - 10:20 pm
image
image
Hi Victor

this happens because your computer knows itself by both names, and without coercion will happily use either. Both refer to exactly the same things, but the name switch is just a tad confusing. There are two solutions:

1. Always use 'myname.local' to refer to the local web server

2. edit your web server config [/etc/httpd/httpd.conf] to make your web server think your machine is called localhost, by changing the server name to 'localhost' in your httpd.conf file. I just tested this and it seems to work.

If you are not familiar with editing your web server config, let me know and I can offer a little advice.

Finally - if you're running web sharing and are connected to the internet, it is completely possible for external people to see whats in there. I usually do some other apache tricks to keep undesirables out of my local web server, and can offer some advice on those, too...

Cheers

Adam

neosable - Jun 28, 2005 - 10:44 pm
image
image
Hi adam thx for you response

[Finally - if you're running web sharing and are connected to the internet, it is completely possible for external people to see whats in there. I usually do some other apache tricks to keep undesirables out of my local web server, and can offer some advice on those, too...]


thats exaclty what i am looking for, I am webdesigner and I have a version of my projects running on my computer before uploading to my webserver but with mac my coworkers cant see what i have on my personal webserver becouse the url changes to myname.local

any advise about web server is very welcome
adamski - Jul 6, 2005 - 7:27 pm
image
image
Hi Victor

My local machine [the one I type at now] is in a very similar situation. It runs Apache - or 'web sharing' in the 'sharing' preferences pane, but you can't get pages from it unless you are within my subnet, or know the secret password :-)

The first thing I did, to make sure my own computer is not serving web pages to the world, was head to a file called 'httpd.conf' - you'll find it in look in '[your HD]/etc/httpd/'. Open it in a text editor, and save it as a copy [httpd.conf.bak or something]. You'll be asked to enter an admin password to do that.

Firstly, when you edit httpd.conf, make sure you don't make any changes that you can't predict the effect of. If you're curious about anything, google the term first, or have a look at apache's documentation:

http://httpd.apache.org/docs/

Then, making sure you are editing 'httpd.conf' [you might need to re-open it], find a section saying:
-----
# Controls who can get stuff from this server.

Order allow,deny
Allow from all
-----

..this is perfect for a normal web server, but not your private develpment machine. My first trick was to change the 'Order allow,deny' statement to:

---
Order deny, allow
Deny from all
---

This tells your web server to not give pages to anyone. Not what you want, either. However, if you have a local subnet - for example, all your machine IP addresses start with the same three numbers, [like 103.14.12] then the following will deny requests from every computer whose IP address does not start with the numbers you specify:
---
Order deny,allow
Deny from all
Allow from 103.14.12
---

Of course, any time you make these changes, you need to save 'httpd.conf' and restart your web server - heading to the sharing control panel and turning web sharing off and on again will do so.

You will also want to read Apache's documentation - it's very good:

http://httpd.apache.org/docs/howto/auth.html#allowdeny

I use some other tricks to make sure I can access my own machine from anywhere, but nobody else can. You'll find more in the Apache docs.

Apologies if this is all a bit simplistic!

Cheers

Adam

IF THIS IS YOUR QUESTION AND YOU WISH TO RESPOND, LOGIN HERE FIRST.


Search Engine Optimization by vBSEO 3.3.0 RC1