Welcome Guest, Not a member yet? Register   Sign In
Location and Name of CI v4 .env File
#3

(This post was last modified: 11-11-2020, 07:24 AM by captain-sensible.)

Not sure if your on Linux xampp for Windows used to be called WAMP  but i have a few web dev all in the same hosting space.

Currently I have in /var/www/htdocs/  one wordpress and the rest CI4:

Code:
├── GBYS
├── andrinaDesStudio
├── andrinaPerfectBeauty
├── appstarter
├── basic
├── ginabrookes
├── index.php
└── wp

everything above is a directory and each has its own config with no clash. This is what it looks like inside one dev:


Code:
basic
├── README.md
├── app
├── builds
├── composer.json
├── composer.lock
├── env
├── license.txt
├── phpunit.xml.dist
├── public
├── spark
├── tests
├── vendor
└── writable


the trick is to make use of virtualhost  :

Code:
<VirtualHost 127.0.0.8:80>
ServerName wp.com
ServerAlias www.wp.com
DocumentRoot "/var/www/htdocs/wp"
<Directory "/var/www/htdocs/wp">
Order allow,deny
Allow from All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.2:80>
ErrorLog "/var/log/httpd/girls_be_yourself.org-error_log"
<Directory "/var/www/htdocs/GBYS/public">
Order allow,deny
Allow from All
AllowOverride All
Require all granted
</Directory>
ServerName CI.org
DocumentRoot "/var/www/htdocs/GBYS/public"
ServerAlias www.GBYS.org

</VirtualHost>


FOr the Wordpress site i stipulate I can access site via address bar in web browser using 127.0.0.8 and for one of the CI4 GBYS i access in browser using 127.0.0.2  . Also i point webserver to listen to requests from the web root of the directory called "wp" whereas via virtual host config i tell it to listen at GPWS/public .

Every web dev has its own config , with no clash .


if you want to use domain in web address you can use /etc/hosts such as:

127.0.0.8 <some domain alias>
127.0.0.2 <some other>
Reply


Messages In This Thread
RE: Location and Name of CI v4 .env File - by captain-sensible - 11-11-2020, 07:19 AM



Theme © iAndrew 2016 - Forum software by © MyBB