Last active
May 5, 2022 13:29
-
-
Save vishnukumarpv/a01893dc713e75a4337afbc98bc9de11 to your computer and use it in GitHub Desktop.
*.localhost virtual host
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory /home/zt-user/Public_Html/> | |
Options Indexes FollowSymLinks | |
AllowOverride all | |
Require all granted | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
Require all granted | |
</Directory> | |
<VirtualHost 0.0.0.0:80> | |
ServerAdmin admin@dev | |
ServerName 127.0.0.1:80 | |
ServerAlias *.*.localhost | |
CustomLog /var/log/apache2/dev-access.log combined | |
ErrorLog /var/log/apache2/dev-error.log | |
VirtualDocumentRoot /home/zt-user/Public_Html/%2 | |
# Header set Access-Control-Allow-Origin "*" | |
# Header always set Access-Control-Allow-Methods "POST, PUT, GET, DELETE, OPTI$ | |
# Header always set Access-Control-Allow-Headers "Content-Type" | |
<Directory /home/zt-vishnukumar/Public_html> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
</VirtualHost> | |
<VirtualHost 0.0.0.0:80> | |
ServerAdmin admin@dev | |
ServerName 127.0.0.1:80 | |
ServerAlias *.localhost | |
VirtualDocumentRoot /home/zt-vishnukumar/Public_html/%1 | |
#RewriteEngine On | |
#RewriteCond %{HTTP_HOST} !^www\. [NC] | |
#RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] | |
#RedirectMatch ^/https?://(.*)$ http://www.%{HTTP_HOST}%{REQUEST_URI} | |
<Directory /home/zt-vishnukumar/Public_html> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
DirectoryIndex index.php | |
</Directory> | |
</VirtualHost> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory /home/zt-vishnukumar/Public_html/> | |
Options Indexes FollowSymLinks | |
AllowOverride None | |
Require all granted | |
</Directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerAdmin admin@localhost | |
ServerName localhost | |
ServerAlias www.localhost | |
DocumentRoot /home/zt-user/Public_Html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLEngine on | |
SSLCertificateFile /etc/apache2/ssl/apache.crt | |
SSLCertificateKeyFile /etc/apache2/ssl/apache.key | |
<FilesMatch "\.(cgi|shtml|phtml|php)$"> | |
SSLOptions +StdEnvVars | |
</FilesMatch> | |
<Directory /var/www/html> | |
SSLOptions +StdEnvVars | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
BrowserMatch "MSIE [2-6]" \ | |
nokeepalive ssl-unclean-shutdown \ | |
downgrade-1.0 force-response-1.0 | |
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
</VirtualHost> | |
<VirtualHost _default_:443> | |
ServerAdmin admin@localhost | |
ServerName 127.0.0.1:443 | |
ServerAlias *.localhost | |
#DocumentRoot /home/user/Public_Html | |
VirtualDocumentRoot /home/zt-user/Public_Html/%1 | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
SSLEngine on | |
SSLCertificateFile /etc/apache2/ssl/apache.crt | |
SSLCertificateKeyFile /etc/apache2/ssl/apache.key | |
<FilesMatch "\.(cgi|shtml|phtml|php)$"> | |
SSLOptions +StdEnvVars | |
</FilesMatch> | |
<Directory /home/user/Public_Html> | |
SSLOptions +StdEnvVars | |
DirectoryIndex index.php | |
AllowOverride All | |
Order allow,deny | |
Allow from all | |
</Directory> | |
BrowserMatch "MSIE [2-6]" \ | |
nokeepalive ssl-unclean-shutdown \ | |
downgrade-1.0 force-response-1.0 | |
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown | |
</VirtualHost> | |
</IfModule> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment