PHP Classes

File: fwphp/glomodul/mkd/01/001_php_html_js/001_apache_php/httpd-vhosts.conf

Recommend this page to a friend!
  Classes of Slavko Srakocic   B12 PHP FW   fwphp/glomodul/mkd/01/001_php_html_js/001_apache_php/httpd-vhosts.conf   Download  
File: fwphp/glomodul/mkd/01/001_php_html_js/001_apache_php/httpd-vhosts.conf
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: Update of fwphp/glomodul/mkd/01/001_php_html_js/001_apache_php/httpd-vhosts.conf
Date: 1 year ago
Size: 3,948 bytes
 

Contents

Class file image Download
# Virtual Hosts # u:\wamp64\bin\apache\apache2.4.33\conf\extra\httpd-vhosts.conf # see u:\wamp64\bin\apache\apache2.4.33\conf\httpd.conf # Define INSTALL_DIR u:/wamp64 #https://stackoverflow.com/questions/26113258/wamp-virtual-host-not-working?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa #To allow other PC's inside your local network to see your eg test1 site, add this syntax to one or more of your Virtual Host definition. # #Allow just a single other PC into your site #Require local #Require ip 192.168.1.100 # #or 2 other PC's #Require local #Require ip 192.168.1.100, 192.168.1.101 # #or to anyone on your local network : use first 3 of 4 quartiles of the ip address. #Require ip 192.168.1 #Also avoid allowing access from anywhere #Require all granted <--Apache 2.4 syntax #or #Order Allow,Deny <-- Apache 2.2 syntax #Allow from all #http://localhost:8083/ or http://sspc1:8083/ <VirtualHost *:8083> ServerName localhost ServerAlias localhost #see httpd.conf : Define INSTALL_DIR u:/wamp64 DocumentRoot "${INSTALL_DIR}/www" #u:\wamp64\bin\apache\apache2.4.33\logs\localhost-error.log ErrorLog "logs/localhost-error.log" CustomLog "logs/localhost-access.log" common SetEnv APPLICATION_ENV "development" #tells Apache which IP Addresses it is allowed to accept connections from <Directory "${INSTALL_DIR}/www/"> #https://stackoverflow.com/questions/25423141/what-exactly-does-the-multiviews-options-in-htaccess?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa #Options -MultiViews = content negotiation is disabled, so rule in .htaccess will be now evaluated (eg -MultiViews is on some shared hostings) #For example, if you have a file called configuration.php (or other extension) in root folder and you set up a rule in your htaccess for a virtual folder called configuration/ then you'll have a problem with your rule because the server will choose configuration.php automatically (if MultiViews is enabled, which is most of the time) Options +Indexes +Includes +FollowSymLinks +MultiViews #or Options Indexes FollowSymLinks AllowOverride All Require local #avoid allowing access from anywhere #Require all granted </Directory> </VirtualHost> #http://dev1:8083/www/ (if no vhost dev1 : http://sspc1:8083/fwphp/www/ ) <VirtualHost *:8083> ServerName dev1 ServerAlias fwphp #eg my firma name or fwphp (dirs www, zinc=resources, vendor, apps... are BELOW this dir !!!) DocumentRoot "u:/wamp64/www/fwphp" ErrorLog "logs/dev1-error.log" CustomLog "logs/dev1-access.log" common SetEnv APPLICATION_ENV "development" <Directory "u:/wamp64/www/fwphp/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> </VirtualHost> #http://test1:8083/ <VirtualHost *:8083> ServerName test1 ServerAlias test1 DocumentRoot "j:/awww/apl/dev1" ErrorLog "logs/test1-error.log" CustomLog "logs/test1-access.log" common SetEnv APPLICATION_ENV "development" <Directory "j:/awww/apl/dev1/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> </VirtualHost> #http://test2:8083/ <VirtualHost *:8083> ServerName test2 ServerAlias zbig DocumentRoot "j:/awww/apl/dev2" ErrorLog "logs/test2-error.log" CustomLog "logs/test2-access.log" common SetEnv APPLICATION_ENV "development" <Directory "j:/awww/apl/dev2/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> </VirtualHost> # test same as localhost !!! #<VirtualHost *:8083> # ServerName usb1 # ServerAlias usb1 # DocumentRoot "U:/wamp64/www" # <Directory "U:/wamp64/www/"> # Options +Indexes +Includes +FollowSymLinks +MultiViews # AllowOverride All # Require local # </Directory> #</VirtualHost>