Apache FAQ:Apache��������
Apache��Ĭ����������
��һ��������ʱ�����������ȼ������Ƿ�ʹ����һ���ܺ�NameVirtualHost�� ƥ����IP��ַ�������ܹ�ƥ�䣬 ���ͻ�����ÿ��������IP��ַ����Ӧ��<VirtualHost>���öΣ� �������ҳ�һ��ServerName��ServerAlias����������������������ͬ�ġ� �����ҵ��ˣ����ͻ�ʹ�����������������á� ����ʹ�÷�������IP��ַ�ĵ�һ���г�������������
������������һ���г������������������䵱��Ĭ�����������Ľ�ɫ��
��һ��IP��ַ��NameVirtualHostָ���е�����������ʱ���� ���������е�DocumentRoot����Զ���ᱻ�õ��� ���ԣ�����������һ����������Ӧ�κ�һ���ض������������������������õĻ��� ��ֻҪ�İ��������÷ŵ�<VirtualHost>���ö��У� �������ŵ������ļ�����ǰ���Ϳ����ˡ�
�ɴ˿ɼ�����������Ҳ�ǽ���Ĭ��վ���ķ���
VirtualHost�IJ������� ��NameVirtualHost�IJ�������
������˵��һ��IP��ַ������*���������е�ַ���������Σ�������IP��ַ��ȷ����ʱ����ʹ��* �Ǻܷ����ġ�������˵������ISP�������õ��Ƕ�̬IP��ַ�������� ʹ����ij�ֶ�̬��������ϵͳʱ����Ϊ*ƥ���κ�IP ��ַ�������������������£�����IP��ַ���α仯����������Ҫ�� ���������á����ǣ���������Ϊ��ͬ��IP ��ַ���Ƕ˿��ṩ��ͬ������ʱ�������Ͳ���ʹ��*��
Ϊ���ж˿����� _default_��������
�������ã��Բ����κ�ָ��ûָ����IP��ַ�Ͷ˿ڵ������� ˵��һ��û���κ���������ʹ�õĵ�ַ/�˿ڶԡ� ����������<VirtualHost _default_:*>
DocumentRoot /www/default
</VirtualHost>
ʹ������һ��ʹ��ͨ�����˿ڵ�Ĭ����������������Ч�ķ�ֹ�������� ���������ա�
����һ����ַ/�˿ڶ��Ѿ���һ��������������������ʹ�ã���ôĬ���� �����������ᴦ������������ַ/�˿ڵ�����������һ�������� Host:ͷ�а���δ֪��Ϣ�����߸ɴ���û�У���ô���ᱻ��һ ���������������������������������ļ������ȳ��ֵ�ʹ�����Ǹ���ַ/�� �ڶԵ�����������������
��������AliasMatch�� RewriteRule����д�κ� ������ʹ��ָ��һ��������Ϣҳ�棨a single information page�������� ������
��ʹ�û���IP����������ʱ������������_default_������û��ƥ���������г���������������������Ϊƥ���κ�IP��ַ��������������û�н���_default_�����������趨ʱ����û��IP������ƥ���������£���ʹ�á����������������������������������ö�֮���������������á�������ע�⣺�κ�ƥ��NameVirtualHostָ����IP��ַ�Ȳ���ʹ��"main"���������ã�Ҳ����ʹ��_default_�������������á�
û��������
Ϊʲô����Apache��ʱ����ʾ:"Could not determine the server's fully qualified domain name, using ��.��.��.�� for ServerName��If no
ServerName is specified, then the server attempts to deduce the hostname by performing a reverse lookup on the IP address. If no port is specified in the ServerName, then the server will use the port from the incoming request. For optimal reliability and predictability, you should specify an explicit hostname and port using the ServerName directive.����ServerNameû��ָ������ô������������ִ��һ��������IP lookup���ƶ�������hostname. ����
��������1�� �������������
ServerName <server_name_or_ip_addr>
���У���������Ҫ��/etc/hosts Ϊ����servername����ip,������û�а�װbind��dns�����Ļ�
��������2:
#echo ns.vhostman.net > /etc/hostname
#/bin/hostname -F /etc/hostname
ע��/etc/hostnameӦ���Ƕ̵���������FQDNӦ���� /etc/hosts������
�˿�ռ��
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs
������������apache 1.x�ˣ���ͣ��httpd��Ȼ��������apache2
����:Johnny ��������:2005-11-12
- ת����ע����Դ��ITѧϰ�� ��ַ��http://www.t086.com/ �����������Ƽ�������
- �ر������� ��վ�������ر�������ֹת�ص�ר�������������¿�������ת�أ���������ע��������ԭʼ���ߡ����°�Ȩ������ԭʼ�������С����ڱ���վת�����µĸ��˺���վ�����DZ�ʾ������л�⡣������վת�ص������а�Ȩ��������ϵ���ǣ����ǻᾡ�����Ը�����
- �������е���ɫ
- �������ж�IP��ַ��A��B���C��
- ������ϵ��Ц�� (ʷ����ȫ��
- ��Google���������ŵ���ͨv4.0
- ���ٶ�ͳ��URL��hm������utm�����Ķ�Ӧ��ϵ
- ���������ԡ���װ Windows XP ����ϵͳ��ͼ��ȫ����
- ��ƻ������MACbook Air���ݼ���ȫ
- ��Linux��ʹ��host��dig��nslookup��ѯDNS
- �����Լ���VPS�Google��������
- ��С�ڴ�VPS֮Nginx+PHP-fpm�߸����Ż���ѹ�����Է���
- ������������������̸�����ɶ��ر�
- ��������������ѡʳƷ����2020�ļ��ȵ�Ͷ�ʲ��Ժ���������
- �����ڵ�����֤50���ƴ�50����ָ֤�������Ĺ���
- ����֤50����Щ��Ʊ_��֤50Ȩ����������
- ������300����֤50����֤500��ָ��2019���ڶ��ζ��ڵ���������
- ������300��ֵ/�ɳ�ָ�����Ʒ����������й�ƽ��Ȩ���½�
- ����ָ֤��������֤50��ָ��������
- ����ָ֤��������֤����ָ��������
- ����ָ֤��������֤100ָ��������
- ����ָ֤����������300ָ��������