PHP deployment to a Linux server, quite simple, the project code upload, and then configure the HTTPD service listening port and code in the directory, access to use the Linux server domain name + port number, will enter the PHP project. Such as:
<virtualhost *: > /usr/code/www/project/ ServerName www.myproject.com</VirtualHost><Directory/usr/code/www/project/> Options Indexes FollowSymLinks multiviews allowoverride all Order allow,deny to </Directory>
This way, the use of www.myproject.com:80 is entered into the/usr/code/www/project directory.
However, if there are some other resources, such as tablets, is not placed in the code project, but a separate directory, this is better understood, because the general such resources, are independent placement, conducive to backup and multi-project sharing. The slice is placed in the/pic directory, how to use Www.myproject.com/pic to access the/pic directory. Also very simple, add a line configuration can.
<virtualhost *: > /usr/code/www/project/ ServerName www.myproject.com/pic/"/pic/"</virtualhost><directory/usr/code/www/ project/> Options Indexes followsymlinks multiviews allowoverride all Order allow,deny allow from all </Directory>
This configuration can be generalized to CDN acceleration, where resources can be used without the same directory as the code.
PHP access to out-of-project directory configuration