Welcome Guest, Not a member yet? Register   Sign In
TIps to organize my webserver.
#1

[eluser]Unknown[/eluser]
Hi guys, I'm a student from the third year of system development course in Brazil.
Me and my friends started a small business for develop for applications, but I'm the only one that develops for web (php).
I have almost no experience, we have at least two sites to deliver (one is almost ready, but its not whit the codeIgniter pattern),
recently i started to use codeigniter,and I'm amazed whit it's simplicity and power,

Is there a way that i can organize my folders on the server to be like this:

/root
--'private'
----
----'System' (CodeIgniter System Folder)
----'main_domain' (this is my application folder)
----'client_site_1' (this is my application folder)
----'client_site_2' (this is my application folder)
----
--'www||htdocs' (public)
----'main_domain' ^(index.php | assets | public_things)
----'client_site_1' ^(index.php | assets | public_things)
----'client_site_2' ^(index.php | assets | public_things)

'' = is a folder
() = what it is
^() = what has inside

*The big question is: Can i make each domain redirect to it's folder (example.com -> example_folder)?
*Where would i put the .htaccess file, will it be only one? Who much would i use?
*Where would i put the error html, and the other annoying auto generated by the server files? (404.html, 405.html, cgi_folder)
how would i write then? (I'm not particular good whit the apache syntax)

I like this way because it seams safe,
and when there is a new project, i just create the folders whit the client name,
then send the guy from bluehost redirect the url to the folder (don't know how to do it)
I would like to keep this folders the cleanest possible
AND THE MOST IMPORTANT: I'm kind of crazy whit patterns and organization (i need i pattern to live)
#2

[eluser]JoostV[/eluser]
No problem. Just create a new webroot for every client. It must contain:
* index.php
* .htaccess (just a regular mod_rewrite will do)
* error html files

Set the paths to the proper folders in index.php. You can use a single shared system folder and give every client ther own application folder.

Code:
$system_path = "/path/to/the/shared/system/folder";
$application_folder = "/path/to/the/client/application/folder";

#3

[eluser]JoostV[/eluser]
No problem. Just create a new webroot for every client. It must contain:
* index.php
* .htaccess (just a regular mod_rewrite will do)
* error html files

Set the paths to the proper folders in index.php. You can use a single shared system folder and give every client ther own application folder.

Code:
$system_path = "/path/to/the/shared/system/folder";
$application_folder = "/path/to/the/client/application/folder";

#4

[eluser]Unknown[/eluser]
[quote author="JoostV" date="1373866843"]No problem. Just create a new webroot for every client. It must contain:
* index.php
* .htaccess (just a regular mod_rewrite will do)
* error html files

Set the paths to the proper folders in index.php. You can use a single shared system folder and give every client ther own application folder.

Code:
$system_path = "/path/to/the/shared/system/folder";
$application_folder = "/path/to/the/client/application/folder";

[/quote]

Thanks, I Will be doing it. And Joost, I'm seeing your tutorial right now, and it's amazing, thanks a lot.
#5

[eluser]JoostV[/eluser]
You're welcome Smile




Theme © iAndrew 2016 - Forum software by © MyBB