Jump to content

Configuring Apache - Servername


Peep
 Share

Recommended Posts

I had apache up and running, but somewhere along the line I've messed it up, and i think it may have to do with this line:

 

ServerName computername.domain.name

 

How do I know what my "fully qualified domain name" is? I'm using no-ip, so i'm not sure whether i should put the noip domain name in there, or my ip address, or... something else? (i have a hostname, but am not sure about my "domain.name") i'm on DSL behind a router, I assume I don't need to put the domain that my external IP is on, or do I? I currently get a 403 error from inside the NAT, outside the NAT, or even on the server itself. (so if this doesn't sound like the error is here... does anyone have a clue where else i might've messed things up?)

Link to comment
Share on other sites

[gd@localhost gd]$ cat /etc/httpd/conf/httpd.conf | grep ServerName

ServerName gd://gd.no-ip.com

 

I'm using no-ip and I wrote it beside ServerName variable. This is just to write something like

Not Found



The requested URL /perl was not found on this server.



Apache-AdvancedExtranetServer/1.3.26 Server at gd://gd.no-ip.com Port 80

when the page isn't found. I don't think your problem is there.

 

MOttS

Link to comment
Share on other sites

This is just a thought, and I might be way off. Since it is a 403 error, which indicates you are unauthorized to view the page, it sounds like your port 80 might be blocked. What happens if you set up port forwarding? Have your router, or your nat forward port 80 to port 8080. Then in your config files, put in

 

computername.domain.name:8080

Link to comment
Share on other sites

i don't think it's a port issue because it is reaching the server (ie, i can change the error message in the httpd.conf file from "access forbidden--go away" to "i like cheese" and when i try to access the server, it'll say "i like cheese") if the ports were blocked, wouldn't it just not connect at all?

Link to comment
Share on other sites

ok, i just shut down and restarted httpd, and noticed the following error:

/etc/init.d/httpd: line 56: /var/run/httpd.pid: No such file or directory

The server will start back up, and when i do a "/etc/init.d/httpd status" i get:

httpd (pid 3590) is running...

3589 (pid 3588) is running...

3587 (pid 3586) is running...

3579 (pid ) is running...

Sorry to take this thread a bit away from its purpose... if you think I should start a new thread, I will.

 

Edit: ok, i looked through my files again, and when i added a <directory> entry specifically for my htdocs directory, now it works. it looks like the default setup i had been using was only a deny from all to deny access to the root. so at least i can see my docs... now i need to figure out virtual servers, which is more an issue of me reading more of the docs to figure it out. but if anyone knows what's going on with the .pid file... let me know :>

Link to comment
Share on other sites

Not with mandrake. I have a similar problem with Sourcemage because /var/run is part of a tmpfs, which isn't available when apache first tries to start. In my case (which might have nothing to do with yours) I just have init.d run a script that does a mkdir /var/run/httpd

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...