Apache Server Configuration Small under Linux

xiaoxiao2021-03-05  22

First, install

(Very failed, I finished, I know that I have already installed apache, Alas, write together in my FC3.

I don't know what is going on (crazy?), The next few Apache can't decompress correctly:

[root @ Mmpire TMP] # tar -zxvf apache_1.3.33.tar.gz

Gzip: stdin: invalid compressed data -format voilated

TAR: Child Returned Status 1

TAR: Error EXIT Delayed from Previous Errors

[root @ Mmpire TMP] #

It's not true, and finally I have opened the ugly xwindow, and I will go directly to the FTP server with the browser to decompress an apache_1.3.23. Later, I think it is because I have a few back, the few days are really data bad. Because this apache_1.3.33.tar.gz does use the command to decompress.

Then start installing, follow the checklist below:

[root @ Mmpire TMP] # ./configure -prefix = / usr / local / apache /

[root @ Mmpire TMP] # Make

[root @ Mmpire TMP] # make install

[root @ Mmpire TMP] # vi /usr/local/apache/conf/http.conf

[root @ Mmpire TMP] # / usr / local / apache / bin / apachectl start

Ok, the server started.

You can also see the version of Apache:

[root @ Mmpire TMP] # crpm -q hpptd

HTTPD-2.0.52-3

The version number, FT of the Apache, which is originally in the FC3.

Is there any way to display this apache version? Let's talk about it, there is no way now.

(Who says there is no way? Don't you go directly to the configuration file!)

Second, run

Don't be happy, it is very likely that your server is still unacceptable, and the following is a test of the test:

1. Access on your own machine: Generally, after starting the server, you can access localhost or 127.0.0.1 in the browser.

But is I don't have two apache? Trouble, don't know which one is.

[root @ Mmpire TMP] # /etc/init.d/httpd start

This command is used to launch the Apache server that comes with the system, I don't want it now, turn it off:

[root @ Mmpire TMP] # /etc/init.d/httpd stop

Open my own:

[root @ Mmpire TMP] # / usr / local / apache / bin / apachectl start

Ok, then enter LocalHost in the browser address bar will display the default page of Apache. You can put your own webpage in / usr / local / apache / htdocs, such as I put an IDEX.htm here, the content is:

Hello World!

Then enter the address bar: http: // localhost / idEx, you will see the classic Hello World.

2, access from the block machine: I said that the block machine refers to the machine that can take each other through IP, such as the Apache server IP in the FC3 in the virtual machine, I want to access it from the host WindowsXP .

Just starting from XP, you can't access it, use the MSDOS window to use Telnet, in fact, this is because the server-side system uses a firewall. Ok, turn off it:

View firewall information:

[root @ Mmpire TMP] # iptables -l

Turn off the firewall:

[root @ Mmpire TMP] # /etc/init.d/iptables stop

Another visit from the outside is possible. Other configurations can be found online, this place is good:

http://www.shunz.net/mybook/apachemanual/

Hey, or if I have a proxy for my machine, there is no external network IP, I have a server is really good, and there is WWW and ftp, huh, huh.

Addressing: As soon as I see the Apache version, I can see it as long as I have a DOS command Telnet 173.26.100.32 in my XP (i.e., a semi-block machine).

转载请注明原文地址:https://www.9cbs.com/read-35979.html

New Post(0)