webservers:configuration_virtualhost
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
webservers:configuration_virtualhost [2023/11/02 07:18] – removed - external edit (Unknown date) 127.0.0.1 | webservers:configuration_virtualhost [2023/11/02 07:19] (current) – ↷ Page moved from webserver:configuration_virtualhost to webservers:configuration_virtualhost skipidar | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Configuration of a Virtual Host ===== | ||
+ | In the example configuration the \\ | ||
+ | ^What ^Configuration ^ | ||
+ | |Domain Name is: | paywyw.com | | ||
+ | |The webserver' | ||
+ | |The Apache webserver' | ||
+ | |||
+ | == 1. Parking and redirecting == | ||
+ | After registering and parking the domain by some registrar (in my case Godaddy) redirect the domain to your server. \\ | ||
+ | To redirect **all subdomains** to the webserver ip use the wildcard: ' | ||
+ | To redirect **the domain ** paywyw.com itself to the webserver ip use: ' | ||
+ | |||
+ | |||
+ | == 2. Creating the new domain == | ||
+ | Under **/ | ||
+ | Here are some example Virtual-Host files listed: | ||
+ | {{http:// | ||
+ | |||
+ | To add a default Virtual Host, which will handle redirects from any Domain do add a file named **default** | ||
+ | (and <fc # | ||
+ | All redirects, which are not matched by any VirtualHost Entry will be handled by this VirtualHost. | ||
+ | < | ||
+ | < | ||
+ | DocumentRoot / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | To add a default Virtual Host, which will handle redirects from a concrete (sub)domain do | ||
+ | (and <fc # | ||
+ | < | ||
+ | < | ||
+ | ServerName subdomainname.paywyw.com | ||
+ | ServerAlias www.subdomainname.paywyw.com | ||
+ | DocumentRoot / | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | == 3. Enabling the new Domain on the Webserver == | ||
+ | Do run the command and pass the name of the file, representing the VirtualHost as parameter: | ||
+ | < | ||
+ | root@irony: | ||
+ | Site www.example.com installed; run / | ||
+ | |||
+ | root@irony: | ||
+ | Site www.example.com installed; run / | ||
+ | </ | ||
+ | |||
+ | Or just create a symbolic links in the folder **/ | ||
+ | < | ||
+ | root@irony:/ | ||
+ | </ |