apache
作者 佚名技术
来源 Linux系统
浏览
发布时间 2012-05-16
es used by the ''main'' # server, which responds to any requests that aren''t handled by a # <VirtualHost> definition. These values also provide defaults for # any <VirtualHost> containers you may define later in the file. # # All of these directives may appear inside <VirtualHost> containers, # in which case these default settings will be overridden for the # virtual host being defined. # # # ServerAdmin: Your address, where problems with the server should be # e-mailed. This address appears . some server-generated pages, such # as error documents. e.g. [email]admin@your-domain.com[/email] # ServerAdmin root@localhost # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. # # If your host doesn''t have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName [url]www.example.com:80[/url] # # UseCanonicalName: Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off # # DocumentRoot: The directory out of which you will serve your
# # You may use the command line option ''-S'' to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost *:80 # # NOTE: NameVirtualHost cannot be used without a port specifier # (e.g. :80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #<VirtualHost *:80> # ServerAdmin [email]webmaster@dummy-host.example.com[/email] # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common #</VirtualHost> 用户登陆: <Directory "/www1"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all authtype basic anthname "jay.com" authuserfile /etc/httpd/conf/password :htpasswd -a xiaozhe require valid-user xiaozhe </Directory> 虚拟主机IP: <VirtualHost 192.168.3.160:80> DocumentRoot /www1 </VirtualHost> SSL:https <Directory "/www2"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all SSLCertificatefile /etc/httpd/conf/server.crt 使用openssl生成两个文件 SSLCertificatekeyfile /etc/httpd |
|
凌众科技专业提供服务器租用、服务器托管、企业邮局、虚拟主机等服务,公司网站:http://www.lingzhong.cn 为了给广大客户了解更多的技术信息,本技术文章收集来源于网络,凌众科技尊重文章作者的版权,如果有涉及你的版权有必要删除你的文章,请和我们联系。以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢! |
你可能对下面的文章感兴趣
上一篇: linux在VM下分辨率的问题下一篇: linux cluster heartbeat
关于apache的所有评论