Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using apache

Status
Not open for further replies.

coolmego15

Technical User
Oct 18, 2011
1
I am new in web development.I wrote a html code and a pkphp code..I also intalled apache on my linux system.Please tell me how to run the webpage and also bind the domain name? Is there any good resource to learn about using apache.
 
Welcome to tek-tips.

You are asking a rather complex set of questions. I will try to answer as best I can.
1 - How to run webpage: For starters, you need to locate your document root, which is the location where you place the web pages. If you open your browser and go to or unless you have changed anything you should see a very simple page with the words, it works.

The web pages, as I said, are stored in document root. The default location will be somewhat distribution dependent but is probably /var/ something very similar. You can change this location in your httpd.conf file, which is again in a distribution specific location, but likely /etc/httpd or /etc/apache2. The operative things to note are that your configurations are under /etc and the variable information is under /var

Out of the box, PHP may not work. You will need to make sure that your Apache is configured to use PHP. Once you think you have things set up, you can create a simple PHP file in your document root called test.php with a function call to php_info() (google for more specific instructions). Then go to
By default, Apache will not automatically select index.php when you got to the page. You will need to add this to your directory index if you wish to do this.

2 - Bind the domain name. In order to do this, you need to have a registered domain and this domain needs to point to your public IP address. If you are using any sort of firewall or NAT device, you will need to set up the proper port forwarding for port 80. Next, you will need to configure apache to listen on either your designated interface, or bind it to the IP address, or select any (*). This too will be in your apache configuration files, which will also vary with Linux distribution, but are all pretty similar.

3 - as far as good resources, there is the apache documentation page, but personally I think unless you are an expert it really kinds sucks. My advice would be to find some good apache tutorials. If your interests are in page html / php development, you probably won't need to do a lot with the Apache configuration once you get it up and running.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top