Author Topic: Setting up an Apache web server  (Read 1838 times)

Laukev7

  • VIP
  • Member
  • ***
  • Posts: 2,834
  • Kudos: 495
Setting up an Apache web server
« on: 1 September 2003, 05:03 »
As the title implies, I am trying to set up an Apache web server on FreeBSD. Apache seems to be installed correctly, as it displays the default page with my IP address.
 
The problem is that my address doesn't seem to work outside of my local network. When I type [edited] in my browser, it shows the default Apache page, while it does not when I type the same thing on another computer in my network. Ping does not detect anything on the other computer, while it returns 127.0.0.1 on mine.

My browser displays the Apache page when I type my local IP address or 127.0.0.1, but does not work with localhost. It works on the other computers on the network when I type my local IP address (192.168.0.102).

My hosts config is:

::1 localhost localhost.my.domain
127.0.0.1 laukev7 [edited]
192.168.0.102 [edited] laukev7

I am behind a router, and have configured my virtual server HTTP with:

Private IP: 192.168.0.102
Protocol: TCP 80/80

Is there something I am missing here? I am just starting to learn about web servers. Any help will be appreciated.
« Last Edit: 4 June 2010, 11:19 by Refalm »

Baikonur

  • Member
  • **
  • Posts: 45
  • Kudos: 0
    • http://www.homepage.mac.com/citizensane/Personal1.html
Setting up an Apache web server.
« Reply #1 on: 1 September 2003, 07:13 »
You have to put something in your Webserver folder . . .

Library > Web Server

Type

/var/log/httpd in the "Go To" menu for error and access logs.


Also, NOT WISE to broadcast your IP.  As Macs do not have dynamic IPs . . .

[ August 31, 2003: Message edited by: Xenix God ]

"The Freedom of the Individual is the only legitimate object of government." --Frank Lloyd Wright, 1869 - 1959

Laukev7

  • VIP
  • Member
  • ***
  • Posts: 2,834
  • Kudos: 495
Setting up an Apache web server.
« Reply #2 on: 1 September 2003, 21:34 »
This is not my actual IP, only my LAN IP.

And thanks for your advice, but as I said, I use FreeBSD, not Mac OS X (Yet).

Edit: I checked both the access and error logs, where you told me. It appears that my server has indeed been accessed by the other computer, but only when I typed my IP number, not the address, which, unfortunately, does not solve my problem.

[ September 01, 2003: Message edited by: Laukev7: Defender of Canada ]


Stryker

  • VIP
  • Member
  • ***
  • Posts: 1,258
  • Kudos: 41
Setting up an Apache web server.
« Reply #3 on: 1 September 2003, 21:59 »
what does your lan use for name resolution? do you have a dns server? in which case you may want to forward (if ur dns server supports it) *.apacheserver to apacheserver.

some dns servers wont resolve subdomains unless they are added manually.

once you can ping the subdomain, it's time to configure apache for it. virtual hosts can do that for you.

Laukev7

  • VIP
  • Member
  • ***
  • Posts: 2,834
  • Kudos: 495
Setting up an Apache web server.
« Reply #4 on: 1 September 2003, 10:22 »
quote:
Originally posted by Stryker:
what does your lan use for name resolution? do you have a dns server? in which case you may want to forward (if ur dns server supports it) *.apacheserver to apacheserver.

some dns servers wont resolve subdomains unless they are added manually.

once you can ping the subdomain, it's time to configure apache for it. virtual hosts can do that for you.



OK, this is where my knowledge of networks falters. I tried to give as much info as possible, but I don't understand everything. As I said, I'm starting to learn.

I think my D-link router is my DNS server. I tried to ping [edited], and it says "ping: cannot resolve [edited]: No address associated with name". This does indeed look related to the DNS, but I don't know what to do about it, or even how to forward *.apacheserver to apacheserver (if such applies).

And what are virtual hosts? Can you explain about that?
« Last Edit: 28 May 2007, 18:23 by Laukev7 »

sime

  • Member
  • **
  • Posts: 242
  • Kudos: 4
    • http://www.azuro.com
Setting up an Apache web server.
« Reply #5 on: 1 September 2003, 12:11 »
Luke,

How's it going?

If you are still having problems send me a private message and I will give you my email address and we can get you up and running.

Sime
==================================================
If Linux doesn't have the solution, you have the wrong problem.
   
         Sime@04
==================================================

Laukev7

  • VIP
  • Member
  • ***
  • Posts: 2,834
  • Kudos: 495
Setting up an Apache web server.
« Reply #6 on: 1 September 2003, 19:04 »
[Removed]

[ September 01, 2003: Message edited by: Laukev7: Defender of Canada ]

« Last Edit: 28 May 2007, 17:59 by Laukev7 »

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
Setting up an Apache web server.
« Reply #7 on: 1 September 2003, 19:21 »
You can't ping (...) because there's no address associated with it. It's not your dns configuration that's at fault. There is an address associated with (...) though. What is (...)?
« Last Edit: 28 May 2007, 18:07 by Refalm »
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


sime

  • Member
  • **
  • Posts: 242
  • Kudos: 4
    • http://www.azuro.com
Setting up an Apache web server.
« Reply #8 on: 1 September 2003, 19:28 »
Hi Kevin,

My Motorcycle mechanic is called Kevin he's cool  

Same applies anyway. I'm a sys admin and more than willing to help you sort out your network. I'll PM you my email and then we can get you up an running.

 :D

Later

Sime
==================================================
If Linux doesn't have the solution, you have the wrong problem.
   
         Sime@04
==================================================

Laukev7

  • VIP
  • Member
  • ***
  • Posts: 2,834
  • Kudos: 495
Setting up an Apache web server.
« Reply #9 on: 1 September 2003, 19:59 »
Sime: OK, I sent you the email and a PM.

Flap: [edited]
« Last Edit: 28 May 2007, 18:00 by Laukev7 »

flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
Setting up an Apache web server.
« Reply #10 on: 1 September 2003, 20:15 »
But is that actually your domain name? I'm guessing not. What you put in your hosts file only affects name resolution on that machine i.e. if you have laukev7.(...) specified as being 192.168.whatever on one machine, the other machines on the network have no knowledge of the name laukev7.(...). You need to either run a dns server to allow the other machines to resolve names, or more simply just add the relevant lines to the host files on your other machine(s).
« Last Edit: 28 May 2007, 18:08 by Refalm »
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca


Laukev7

  • VIP
  • Member
  • ***
  • Posts: 2,834
  • Kudos: 495
Setting up an Apache web server.
« Reply #11 on: 1 September 2003, 22:09 »
quote:
Originally posted by flap:
But is that actually your domain name? I'm guessing not. What you put in your hosts file only affects name resolution on that machine i.e. if you have [edited] specified as being 192.168.whatever on one machine, the other machines on the network have no knowledge of the name [edited]. You need to either run a dns server to allow the other machines to resolve names, or more simply just add the relevant lines to the host files on your other machine(s).

[ September 01, 2003: Message edited by: flap ]



I had understood that the other computers do not know about the domain name, for the reasons you just explained. However, I do not know how to configure a DNS server, which, from my understanding, I will need to do, if I want my domain name to be broadcast outside of my network.

Sime said he would help me set up a proper server. I need to determine with my dad how we are going to arrange our network in consequence.

Thank you for your help. I will come back here if I have more questions.
« Last Edit: 28 May 2007, 17:42 by Laukev7 »

Faust

  • Member
  • **
  • Posts: 1,223
  • Kudos: 0
Setting up an Apache web server.
« Reply #12 on: 1 September 2003, 23:39 »
quote:
Also, NOT WISE to broadcast your IP. As Macs do not have dynamic IPs . . .


???  confused...
Surely to go on an ISP they do actually have dynamic IP working?  and as it's a bsd base DHCPD should work just dandy...  Is there something Im missing here?

Of course for it to work as a server the IP will have to be stableish, but thats the same with any server, not just Macs.
Yesterday it worked
Today it is not working
Windows is like that
 -- http://www.gnu.org/fun/jokes/error-haiku.html

Laukev7

  • VIP
  • Member
  • ***
  • Posts: 2,834
  • Kudos: 495
Setting up an Apache web server.
« Reply #13 on: 2 September 2003, 00:15 »
Quick question, before I install FreeBSD on the actual server (not my own computer): How much space should I allocate to the /var partition? Usually, I use the default partition scheme for my FreeBSD slice, but I realised that I will probably need more space to store my web pages.

[ September 01, 2003: Message edited by: Laukev7: Defender of Canada ]


flap

  • Member
  • **
  • Posts: 1,268
  • Kudos: 137
Setting up an Apache web server.
« Reply #14 on: 2 September 2003, 00:26 »
You don't have to put your webpages in /var
"While envisaging the destruction of imperialism, it is necessary to identify its head, which is none other than the United States of America." - Ernesto Che Guevara

http://counterpunch.org
http://globalresearch.ca