local path |
[eluser]bralens[/eluser]
How can i get local path with folder? Curently in constants.php file i have defined it like so Code: define('LOCAL_PATH', $_SERVER['DOCUMENT_ROOT'].'/my_project_root_folder/'); how can i replace '/my_project_root_folder/' so it be more flexible?
[eluser]CroNiX[/eluser]
Create a virtual server in Apache so you don't need a subdirectory. I create one for each project. It makes things a lot easier when everything is set up like the live project will be.
[eluser]Samus[/eluser]
[quote author="CroNiX" date="1334603908"]Create a virtual server in Apache so you don't need a subdirectory. I create one for each project. It makes things a lot easier when everything is set up like the live project will be.[/quote] can you describe how you'd do this abit please?
[eluser]bralens[/eluser]
[quote author="CroNiX" date="1334603908"]Create a virtual server in Apache so you don't need a subdirectory. I create one for each project. It makes things a lot easier when everything is set up like the live project will be.[/quote] Thats some thing new to me and first thing tomorrow: google.com
[eluser]CroNiX[/eluser]
Something like this. You will probably have some things you need to change in your main httpd.conf to make this work (like telling it to load the httpd-vhosts.conf file), among others. I don't have everything written down that is necessary, so google is your friend here. From: Apache_dir/conf/extra/httpd-vhosts.conf Code: <VirtualHost *> So DocumentRoot is set to where this project is located (subdir of my public_html dir). And, "project_name.localhost" or "project_name" is the url to access the local site in the browser, and also what you would enter in config.php for the base_url (http://project_name.localhost/) (or leave it blank).
[eluser]Samus[/eluser]
[quote author="CroNiX" date="1334604875"]Something like this. You will probably have some things you need to change in your main httpd.conf to make this work (like telling it to load the httpd-vhosts.conf file), among others. I don't have everything written down that is necessary, so google is your friend here. From: Apache_dir/conf/extra/httpd-vhosts.conf Code: <VirtualHost *> So DocumentRoot is set to where this project is located (subdir of my public_html dir). And, "project_name.localhost" or "project_name" is the url to access the local site in the browser.[/quote] Thanks. Does each project have to be wrapped in those <virtualhost> tags?
[eluser]CroNiX[/eluser]
[quote author="bralens" date="1334604836"][quote author="CroNiX" date="1334603908"]Create a virtual server in Apache so you don't need a subdirectory. I create one for each project. It makes things a lot easier when everything is set up like the live project will be.[/quote] Thats some thing new to me and first thing tomorrow: google.com[/quote]This is how you basically set up shared hosting, making it possible to run many websites on the same server. This is what cPanel/Plesk, etc, do under the hood when creating a new domain. |
Welcome Guest, Not a member yet? Register Sign In |