Highlights of ApacheFAQ

Source: Internet
Author: User
ApacheFAQ-Linux Enterprise Application-Linux server application information. For more information, see the following. Q:
In Apache 1.37
Httpd. conf is set as follows:
NameVirtualHost 202.107.x.22
ServerName www.c1.com
DocumentRoot/home/c1



ServerName www.c2.com
Documentroot/home/c2


You can use http-S/-t to view the VM settings without syntax errors. But httpd cannot be started. Why?
========================================================== ================================
Q:
How to use one IP address to implement multi-VM Service
A:
I wonder if you want to use APACHE to implement the IP-based virtual host service? If yes, you can direct the domain name to the corresponding IP address in DNS, bind these IP addresses to the host's Nic, and then directly use
To implement IP-based virtual hosts.
Q:
I think it should be a directory-based virtual host, because I only have one IP Address
A:
Name-based virtual host (only one IP address)
Port 80
ServerName www.ABC.com
NameVirtualHost 192.168.2.1
<VirtualHost 192.168.2.1>
DocumentRoot/www/efg
ServerName www.efg.com
</VirtualHost>
<VirtualHost 192.168.2.1>
DocumentRoot/www/xyz
ServerName www.xyz.com
</VirtualHost>

The DNS of www.efg.com and www.xya.com is directed to 192.168.2.1.
Q:
Changed httpd. conf according to the method you gave.
And the VM reports the following error:
Forbidden
You dont have permission to access/on the server.
For some reason, please advise. Thank you.
Q:
There are two possible reasons:
1. HTTPD is not started. (Unlikely)
2. MKDIR/WWW/EFG and/WWW/XYZ are not found. (Correct CHMOD permission)
In addition, the index.html file is in the preceding two directories.
Q:
Maximum number of ip addresses per network card
There should be a limit.
A:
My approach is to add a CNAME to the DNS, for example:
Bbs in cname public.domain.com.
Host name in the virtualhost command of the virtual host in apache
Use bbs.domain.com.
========================================================== ======================
Q:
Hello everyone, I installed apache on the/www/apache directory.
Where is the default DocumentRoot?
My/www/apache/conf does not contain httpeh. conf and rms. cong only have httped. conf-ini and srm. conf. ini.
In these two files, Set
DocumentRoot/www/apache/htdocs
And copy them into the corresponding files.
Apache tells me that I cannot find the/www/apache/htdocs/l.html file.
Thank you!
A:
These two INI files are the sample files you provided during installation. You need to rename them src. conf or httpd. conf and then customize the configuration files as needed.
Q:
I have changed it, but I cannot.
Thank you for your help !!
A:
Sorry, I will reply to you now.
Are you installing through your own configuration or by using RPM?
If RPM is used for installation, httpd. conf is placed in/etc by default. Please check.
If you are using your own configuration and installation, and follow the relevant articles in the source code world.
Httpd. conf will be placed in/www/apache/conf, and the file name is httpd. conf instead of httped. conf-ini (if it is 2.0, it will not be known.
========================================================== ==================================
Apache configuration Q & A (1)
Q:
How can I share a directory and use a browser to access it?

A:
1. Add the following line to/home/httpd/conf/srm. conf.
Alias/pub/home/ftp/pub/
2. Change the default file type and change the action in/home/httpd/conf/srm. conf:
DefaultType application/octet-stream
3. restart Apache./etc/rc. d/init. d/httpd restart.
========================================================== ======================
Apache's strange problem for help

Q;My apache server encountered a strange problem, as shown below:
On My apache server, I tried a small program with only print statements. But when I have a chat
The error message returned from the error_log file is as follows:
(2) the file or directory does not contain exec of/home/httpd/cgi-bin/login. cgi failed
Run perl login. cgi in linux;
Login. cgi is also in the/home/httpd/cgi-bin directory;
I have also changed the conf file in the chat room.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.