1"use strict";(globalThis.webpackChunkans_co_uk_docs=globalThis.webpackChunkans_co_uk_docs||[]).push([[26420],{28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var o=t(96540);const r={},s=o.createContext(r);function i(e){const n=o.useContext(s);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:n},e.children)}},38326:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>A,frontMatter:()=>i,metadata:()=>o,toc:()=>S});const o=JSON.parse('{"id":"operating-systems/linux/apache/example-vhosts/index","title":"Example configurations","description":"Some example configurations for the Apache web server","source":"@site/docs/operating-systems/linux/apache/example-vhosts/index.md","sourceDirName":"operating-systems/linux/apache/example-vhosts","slug":"/operating-systems/linux/apache/example-vhosts/","permalink":"/docs/operating-systems/linux/apache/example-vhosts/","draft":false,"unlisted":false,"editUrl":"https://github.com/ans-group/ans.co.uk-docs/tree/main/docs/operating-systems/linux/apache/example-vhosts/index.md","tags":[],"version":"current","sidebarPosition":4,"frontMatter":{"sidebar_position":4,"sidebar_label":"Example configurations","title":"Example configurations","description":"Some example configurations for the Apache web server","keywords":["ans","apache","linux","config","configuration","web","server","virtual","vm","example"]},"sidebar":"documentationSidebar","previous":{"title":"SSL certificates","permalink":"/docs/operating-systems/linux/apache/ssl/"},"next":{"title":"Apache with PHP-FPM","permalink":"/docs/operating-systems/linux/apache/php-fpm/"}}');var r=t(74848),s=t(28453);const i={sidebar_position:4,sidebar_label:"Example configurations",title:"Example configurations",description:"Some example configurations for the Apache web server",keywords:["ans","apache","linux","config","configuration","web","server","virtual","vm","example"]},c="Example configurations",a={},S=[{value:"First domain",id:"first-domain",level:2},{value:"Second domain",id:"second-domain",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"example-configurations",children:"Example configurations"})}),"\n",(0,r.jsx)(n.p,{children:"Here are two example configurations using their own vhosts file."}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsx)(n.p,{children:"It's worth noting that these configuration files use the php-fpm setup described in the following document:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"../php-fpm/",children:"Apache with PHP-FPM"})}),"\n"]})]}),"\n",(0,r.jsx)(n.h2,{id:"first-domain",children:"First domain"}),"\n",(0,r.jsx)(n.p,{children:"File name:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:" /etc/httpd/conf.d/bobscarpets.net.conf\n"})}),"\n",(0,r.jsx)(n.p,{children:"Contents:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'<VirtualHost *:80>\n ServerAdmin [email protected]\n DocumentRoot /var/www/vhosts/bobscarpets.net/htdocs\n ServerName bobscarpets.net\n ServerAlias www.bobscarpets.net\n ErrorLog logs/bobscarpets.net-error_log\n CustomLog logs/bobscarpets.net-access_log combined\n\n <Directory "/var/www/vhosts/bobscarpets.net/htdocs">\n Options FollowSymLinks\n AllowOverride All\n\n Order allow,deny\n Allow from all\n </Directory>\n\n <FilesMatch "\\.php$">\n SetHandler "proxy:unix:/var/run/php-fcgi-bobscarpetsnet.sock|fcgi://127.0.0.1"\n </FilesMatch>\n ProxyTimeout 600\n</VirtualHost>\n\n<VirtualHost *:443>\n ServerAdmin [email protected]\n DocumentRoot /var/www/vhosts/bobscarpets.net/htdocs\n ServerName bobscarpets.net\n ServerAlias www.bobscarpets.net\n ErrorLog logs/bobscarpets.net-error_log\n CustomLog logs/bobscarpets.net-access_log combined\n\n SSLEngine on\n SSLProtocol all -SSLv2 -SSLv3 -TLSv1\n SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS\n SSLCertificateFile /etc/pki/tls/certs/bobscarpets.net.crt\n SSLCertificateKeyFile /etc/pki/tls/private/bobscarpets.net.ke
1y\n\n <Directory "/var/www/vhosts/bobscarpets.net/htdocs">\n Options FollowSymLinks\n AllowOverride All\n\n Order allow,deny\n Allow from all\n </Directory>\n\n <FilesMatch "\\.php$">\n SetHandler "proxy:unix:/var/run/php-fcgi-bobscarpetsnet.sock|fcgi://127.0.0.1"\n </FilesMatch>\n ProxyTimeout 600\n</VirtualHost>\n'})}),"\n",(0,r.jsx)(n.h2,{id:"second-domain",children:"Second domain"}),"\n",(0,r.jsx)(n.p,{children:"File name:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:" /etc/httpd/conf.d/getschwifty.org.conf\n"})}),"\n",(0,r.jsx)(n.p,{children:"Contents:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:' <VirtualHost *:80>\n ServerAdmin [email protected]\n DocumentRoot /var/www/vhosts/getschwifty.org/htdocs\n ServerName getschwifty.org\n ServerAlias www.getschwifty.org\n ErrorLog logs/getschwifty.org-error_log\n CustomLog logs/getschwifty.org-access_log combined\n\n <Directory "/var/www/vhosts/getschwifty.org/htdocs">\n Options FollowSymLinks\n AllowOverride All\n\n Order allow,deny\n Allow from all\n </Directory>\n\n <FilesMatch "\\.php$">\n SetHandler "proxy:unix:/var/run/php-fcgi-getschwiftyorg.sock|fcgi://127.0.0.1"\n </FilesMatch>\n ProxyTimeout 600\n </VirtualHost>\n\n <VirtualHost *:443>\n ServerAdmin [email protected]\n DocumentRoot /var/www/vhosts/getschwifty.org/htdocs\n ServerName getschwifty.org\n ServerAlias www.getschwifty.org\n ErrorLog logs/getschwifty.org-error_log\n CustomLog logs/getschwifty.org-access_log combined\n\n SSLEngine on\n SSLProtocol all -SSLv2 -SSLv3\n SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS\n SSLCertificateFile /etc/pki/tls/certs/getschwifty.org.crt\n SSLCertificateKeyFile /etc/pki/tls/private/getschwifty.org.key\n\n <Directory "/var/www/vhosts/getschwifty.org/htdocs">\n Options FollowSymLinks\n AllowOverride All\n\n Order allow,deny\n Allow from all\n </Directory>\n\n <FilesMatch "\\.php$">\n SetHandler "proxy:unix:/var/run/php-fcgi-getschwiftyorg.sock|fcgi://127.0.0.1"\n </FilesMatch>\n ProxyTimeout 600\n </VirtualHost>\n'})})]})}function A(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.