PDA

View Full Version : apache server going to .local




manchot
Feb 29, 2008, 04:37 PM
so i'm setting up my old mac as a server with apache just for fun and i have everything set up but i noticed that say if i type in:

mylamenoobsite.com/blkadgag/

and the page doesn't exist it will go to the 404... BUT if i type in

mylamenoobsite.com/blkadgag

and the page doesn't exist it will forward the site to nameofmycomputer.local/blkadgag

how do i stop this and just let it go to the 404?

tyvm

edit: also even it is a real page that loads correctly for example:

mylamenoobsite.com/realpage/

if i take the slash out

mylamenoobsite.com/realpage

it will then try to redirect to mycomputer.local/realpage
any help?



ppc_michael
Mar 4, 2008, 01:26 AM
You need to edit your httpd.conf file, located at /etc/httpd/httpd.conf

Uncomment "ServerName" and set it to your yourlamenoobsite.com ( ;) )

Don't forget to restart apache after:

sudo apachectl restart

manchot
Mar 5, 2008, 01:24 AM
TY so much!!

worked like a charm.

DoFoT9
Mar 5, 2008, 01:35 AM
you can host from your mac and view your web page from any computer???

hhmmmmmmm
:confused:

ppc_michael
Mar 5, 2008, 02:20 AM
TY so much!!

worked like a charm.

Glad I could help. :)