CENTOS7 installation configuration Apache (httpd)

Source: Internet
Author: User

  • Installation:
    yum  -y  install  httpd
  • Support Directory Index:
    A. Home index:

    B. Custom Index styles:
  • Support for PHP:
  • Open PathInfo:
  • Resolving Cross-domain:
  • To turn on the rewrite function:
  • To configure a virtual host:
  • Configuration file Reference:
    ServerRoot "/etc/httpd" Listen 80Include conf.modules.d/*.confuser apachegroup apacheserveradmin [email  Protected]<directory/>allowoverride Nonerequire all Denied</directory>documentroot "/var/www/html" < Directory "/var/www" >allowoverride nonerequire all Granted</directory><directory "/var/www/html" > Header set Access-control-allow-origin *options Indexes followsymlinksindexstylesheet "/css/style.css" IndexOptions Fancyindexing HTMLTable scanhtmltitles foldersfirst namewidth=85 descriptionwidth=128 iconwidth=16 IconHeight=16 Versionsort charset=utf-8allowoverride allrequire all Grantedacceptpathinfo on</directory><ifmodule dir_ Module>directoryindex index.html</ifmodule><files ". ht*" >require all Denied</files>errorlog " Logs/error_log "LogLevel warn<ifmodule log_config_module>logformat"%h%l%u%t \ "%r\"%>s%b \ "%{referer}i\" \ "% {user-agent}i\ "" Combinedlogformat "%h%l%u%t \"%r\ "%>s%b" Common<ifmodule logiO_module> Logformat "%h%l%u%t \"%r\ "%>s%b \"%{referer}i\ "\"%{user-agent}i\ "%I%O" Combinedio</ifmodule&gt ; Customlog "Logs/access_log" Combined</ifmodule><ifmodule alias_module>scriptalias/cgi-bin/"/var/www/ cgi-bin/"</ifmodule><directory"/var/www/cgi-bin ">allowoverride noneoptions NoneRequire all granted< /directory><ifmodule Mime_module>typesconfig/etc/mime.typesaddtype application/x-compress. Zaddtype application/x-gzip. gz. Tgzaddtype text/html. Shtmladdtype application/x-httpd-php. phtml. PhP3. Incaddoutputfilter includes. Shtml</ifmodule>adddefaultcharset utf-8<ifmodule mime_magic_module> Mimemagicfile conf/magic</ifmodule>enablesendfile onincludeoptional conf.d/*.conf<virtualhost *:80> ServerName virtual.dollar.comDocumentRoot "/var/www/html/virtual/" DirectoryIndex index.php index.html<directory "/var/www/html/virtual/" > Options Indexes followsymlinks allowoverride all Require all GRANted</directory></virtualhost> 
  • CENTOS7 installation configuration Apache (httpd)

    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.