Jump to content

Apache Newbie Needs Help Getting Started


jbuckley2004
 Share

Recommended Posts

Running Spring 2008 on a 2 machine network at home, and I thought I'd like to try setting up Apache 1.3 and serve my own web pages, just to see what it took.

 

The install seemed successful, and when I went to localhost in the browser, I got an Apache welcome page that starts "Note: If you are seeing this instead of the webpage you expected, it's most likely because the server is not yet fully configured, or is under an upgrade.", and I thought it was a good first step. I can see that page from the other computer (Win2000) too. I was able to change the hostname too, so that I can see this file from both machines by that name and by IP.

 

But then, by cd'ing to /var/www and then ./html (where I thought I would find the file I had just seen in the browser) I find the index.html page that would say only "It Worked!" in big, bold letters. I didn't see that. I have no idea where the file I did see comes from.

 

I understand that somehow, somewhere, I'm not configured to point the web server to /var/www by default, but after two days of searching, I haven't found out how to do that (or where I'm actually pointing now, for that matter).

 

So, my newbie question is, how does one determine where Apache is looking for files, and where might I find the documentation-for-dummies on this?

 

Thankx in advance.

Link to comment
Share on other sites

Configuration files for Apache are usually kept in a subdirectory of etc. The main config file (usually httpd.conf) will tell Apache where to look for files and you can specify other directives there too. If you plan to host more than one site on the same server then you need to use virtual hosts with seperate config files that are kept in another sub-directory.

 

My recommendation would be to check out the official Apache documentation which will fill you in on what to do. The docs are very well written and you shouldn't have trouble understanding them. You may also want to update to the latest version (2.2) although the documentation project keeps separate docs for each major version.

 

You can also use something like Webmin for gui-based configuration, but the CLI method is simple enough. And we're here if you get stuck ;)

Link to comment
Share on other sites

The other page your seeing is probably due to config set in /etc/httpd/conf.d (assuming it's the same in Mandriva as most other distros). Chances are the config file is not pointing to /var/www/html which would serve the "It works!" page, but rather to some other location.

 

If you are using Mandriva, then you can simply install the package drakwizard and then you will have the wizards to configure your Apache server from a gui.

Link to comment
Share on other sites

Many thanks, folks, for the pointers.

I'll be reading the documentation and poking around (and experimenting) as I can this week. This is purely in the spirit of educating myself, here, so there's no time pressure or anything, which is fortunate, 'cause there's a lot to learn.

 

And next, after that, I'll be learning how to spell PHP.

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...