File manager - Edit - /home/autoph/public_html/projects/test_api/README.md
Back
# ahg-prf-api AHG Procurement Request Form System API # PHP Framework - Laravel 10.x.x ## Requirements - PHP version ≥ 8.1 - Git - Composer 2 - JWT-Auth - apache2 - Mysql (Version 8) - PhpMyAdmin Version 6 ## Usage To start the application, open the command prompt or terminal and run the following commands : ``` 1. Clone repository: `git clone https://github.com/AHG-Autohub/ahg-prf-api.git` 2. Go to ahg-prf-api folder `cd ahg-prf-api` 3. Copy and rename the `.env.sample` to `.env` (Change the Database or any configuration) 4. composer update 5. php artisan migrate 6. php artisan jwt:secret ``` To run the applications ``` php artisan serve ``` ## Vhost Configuration Virtual host files are the files that specify the actual configuration of your virtual hosts and dictates how the Apache web server will respond to various domain requests. Apache comes with a default virtual host file called 000-default.conf. You can copy this file to create virtual host files for each of your domains. Copy the default configuration file over to the first domain: ``` sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/your_domain_1.conf ``` Be aware that the default Ubuntu configuration requires that each virtual host file end in .conf. Open the new file in your preferred text editor with root privileges: ``` sudo nano /etc/apache2/sites-available/your_domain_1.conf ``` With comments removed, the file will be similar to this: ``` <VirtualHost *:80> ServerAdmin admin@your_domain_1 ServerName your_domain_1 ServerAlias www.your_domain_1 DocumentRoot /var/www/ahg-prf-api/public <Directory /var/www/ahg-prf-api> AllowOverride All </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> ``` Within this file, customize the items for your first domain and add some additional directives. This virtual host section matches any requests that are made on port 80, the default HTTP port. ## Enabling the New Virtual Host Files ``` sudo a2ensite your_domain_1.conf ``` Next, test for configuration errors: ``` sudo apache2ctl configtest ``` The should receive the following output: ``` Output Syntax OK ``` When you are finished, restart Apache to make these changes take effect. ``` sudo systemctl restart apache2 ``` ## Restarting and Stop apache2 server Once the application starts, the service auto-restarts at server restart or server crash, unless explicitly told by the user. To stop the application, run the following code in the terminal': ``` sudo service apache2 stop ``` To restart the application, run the following code in the terminal': ``` sudo service apache2 restart ``` Note: Remove the 'sudo' command for Windows
| ver. 1.4 |
.
| PHP 8.1.32 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings