Development is now housed on an Amazon EC2 instance. The setup for our development server varies a little but they are very similar in setup. The major difference in the development is that the sub-domain ('amz') is used for all directories.
NameVirtualHost *
<VirtualHost *>
ServerName amz.flogistix.com
DocumentRoot /var/www/html
Alias /scada /var/www/html/scada/public
Alias /manufacturing /var/www/html/manufacturing/public
Alias /api /var/www/html/api/public
<Directory /var/www/html/scada/>
RewriteBase /scada/
</Directory>
<Directory /var/www/html/manufacturing/>
RewriteBase /manufacturing
</Directory>
<Directory /var/www/html/api>
# Allow cross domain ajax calls for API dev
#Header set Access-Control-Allow-Origin "*"
RewriteBase /api
</Directory>
</VirtualHost>
Setting up a new project on the dev server is a 3 step process. SSH into the development server. (See Connecting to AWS)
Navigate to /var/www/html/
Fuel has a utility called Oil which can automate common tasks. It can create a new project for you in one command. Make sure you are in the html/ directory and use the following command oil create [project] (Where [project] is the url-friendly name for your project without square brackets)
Navigate to config folder: cd /etc/httpd/conf.d/
Edit the vhost.conf file: sudo vim vhost.conf
After the 'DocumentRoot /var/www/html' insert an Alias so that the server knows to route traffic to your project.
Alias [project] /var/www/html/[project]/public Where [project] is the url-friendly name for your project (without square brackets).
Now create a directory directive statement to rewrite the base of the fuel project.
<Directory /var/www/html/[project]/ >
RewriteBase /[project]/
</Directory>
Save and quit the editor by pressing the colon key followed by qs (for quit and save) this should quit you out of the editor.
After making those changes to the vhost.conf file you'll need to save. sudo service httpd restart -g
If all goes well you should not see any output.
For information about connecting to a server via FTP (See Connecting to AWS)
On your computer navigate to the location you wish to store the local version of the project.
Using your FTP client download the whole project (located in /var/www/html/[project]/) to your local directory.
Open Netbeans and create a new project
Choose PHP on the left and "PHP Application with Existing Sources". Press Next.
On the following screen do the following:
Change Sources Folder to path to your downloaded Fuel project
Change Project Name to a descriptive name of the project
Check the Put NetBeans metadata into a separate directory checkbox.
Press Next
Change the following:
Change Run As to Remote Web Site (FTP, SFTP)
(Optional) Change Project URL to the public-facing url
Setup Remote Connection by pressing Manage...
Change the following:
Set Host Name to the IP addess of the dev instance. As of right now it is 54.235.212.0.
Set User Name to ec2-user
Password should remain blank
Set the Private Key File to the pem file (explained here)
Set Initial Directory to /var/www/html
Change Timeout to 5
Change Keep-Alive Interval to 5
(Optional) Press Test Connection to verify all fields have been entered correctly. If not use on-screen prompts to troubleshoot problem.
Press OK. The window will close and show the previous screen.
Back on the New Project with Existing Files window set Upload Directory to /[project] (Where [project] is the url-friendly name for your project without square brackets)
Change Upload Files dropdown to On Save
Press Finish