Admin page for RPI Student Government. Can be used for viewing events, student profiles, and history, along with management of all these features. Written in PHP, and uses sg_data as its API.
NOTE: Before beginning setup here, you need sg_data to already be setup.
- Make a clone of the sg_admin repository on your computer
- Download PHP through XAMPP for Windows
- Download Composer, a PHP dependency manager
- Navigate to the location of your sg_admin repository in a Windows Command Prompt
- Verify that Composer is installed by typing
composer -v
- Verify that Composer is installed by typing
- Once inside the project directory, install the proper packages for Composer by running
composer install
- Open up Apache's httpd.conf file through XAMPP Control Panel
- Config button -> Apache (httpd.conf)
- Navigate to the bottom of the conf file and add a new VirtualHost entry by copying and pasting this code:
<VirtualHost localhost:80> DocumentRoot "[location of local repository]\sg_admin" ServerName sg_admin.wtg ServerAlias sg_admin.wtg DirectoryIndex index.php <Directory "[location of local repository]\sg_admin"> Require all granted </Directory> SetEnv API_URL http://localhost:3000/ </VirtualHost>
- Navigate to your System32 directory (be extremely careful not to unintentionally modify anything) and open your hosts file.
- Add a new line to the bottom of the hosts file:
127.0.0.1 sg_admin.wtg
- Start the Apache server through the XAMPP Control Panel by clicking the Start button next to Apache.
- Navigate to
http://sg_admin.wtg/
in your browser and verify that the Admin site is up. - If you have not already setup sg_public, make sure follow that process as well.
NOTE: Before beginning setup here, you need sg_data to already be setup.
- Make a clone of the sg_admin repository on your computer
- PHP may already be installed on your computer, try running
php -v
to confirm this. If not, install PHP. - Download Composer, a PHP dependency manager
- Navigate to the location of your sg_admin repository in Terminal
- Verify that Composer is installed by typing
composer -v
(orphp composer.phar -v
)
- Verify that Composer is installed by typing
- Once inside the project directory, install the proper packages for Composer by running
composer install
(orphp composer.phar install
) - Run
php -S localhost:####
where####
is a port (i.e. 3000 or 8080) to run the app on. (NOTE: this port needs to be different than the port used for sg_data or sg_public). - Navigate to
localhost:####
in your browser and verify that the Admin site is up. - If you have not already setup sg_public, make sure follow that process as well.