Você está na página 1de 2

Here’s a quick way to get your Apache Web Server going:

1. open Terminal (make sure you logged in as a root user)

2. Type the following-


#cd /etc/httpd/conf/httpd.conf

3. Search for the line containing :


ServerName www.example.com:80

And uncomment it. It should be appear as follows:


ServerName www.example.com:80

4. To make the Web server available to your LAN, you can use your
own IP address instead of www.example.com:80 (for example,
ServerName 10.0.0.1) but for a public Web Server we need to
get a real DNS host name.

5. Add an administrative email address where someone can contact


you in case an error is encountered with your server. In the
/etc/httpd/conf/httpd.conf file, the default administrative
address appears as follows:

ServerAdmin root@localhost

Change root@localhost to the email address of your


Apache administrator.

6. Start the httpd server. As root user, type following:

# service httpd start

If all goes well, this message should appear: Starting httpd: [ok].
Now you’re ready to go.

7. To have httpd start every time you boot your system, run the
command as the root user.

# chkconfig httpd on

8. To make sure that the web server is working ,open Firefox and
type:
http://localhost.
9. We haven’t added any content to your web site. To get started
we can add an index.html file that contains home page in the
/var/www/html directory.

--------------------------------------------------------------------

Você também pode gostar