This guide provides detailed installation instructions for different server environments.
For the fastest setup using PHP's built-in server:
# 1. Navigate to the application directory
cd fastway-app
# 2. Start PHP server
php -S localhost:8000
# 3. Open in browser
# http://localhost:8000That's it! The application should now be running.
Before installing, ensure you have:
-
PHP 7.4 or higher with the following extensions:
- cURL
- JSON
- mbstring (usually included)
-
Web Server (one of):
- Apache 2.4+
- Nginx 1.18+
- PHP Built-in Server (development only)
-
Modern Web Browser:
- Chrome 90+
- Firefox 88+
- Safari 14+
- Edge 90+
Advantages:
- No configuration needed
- Quick setup
- Perfect for testing
Steps:
-
Navigate to application directory:
cd /path/to/fastway-app -
Start the server:
php -S localhost:8000
Or on a specific IP:
php -S 0.0.0.0:8000 # Accessible from network -
Access the application:
- Open browser:
http://localhost:8000 - Or:
http://your-ip:8000
- Open browser:
-
Verify installation:
- Visit:
http://localhost:8000/system-check.php
- Visit:
Note: Press Ctrl+C to stop the server.
Advantages:
- Production-ready
- Full .htaccess support
- Better performance
-
Install Apache and PHP:
sudo apt update sudo apt install apache2 php libapache2-mod-php php-curl php-json php-mbstring
-
Enable required modules:
sudo a2enmod rewrite sudo a2enmod headers sudo systemctl restart apache2
-
Copy application to web root:
sudo cp -r fastway-app /var/www/html/ sudo chown -R www-data:www-data /var/www/html/fastway-app
-
Set permissions:
cd /var/www/html/fastway-app sudo mkdir -p logs sudo chmod 755 logs sudo chown www-data:www-data logs -
Configure Apache (Optional):
Create virtual host:
/etc/apache2/sites-available/fastway.conf<VirtualHost *:80> ServerName fastway.local DocumentRoot /var/www/html/fastway-app <Directory /var/www/html/fastway-app> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/fastway-error.log CustomLog ${APACHE_LOG_DIR}/fastway-access.log combined </VirtualHost>
Enable site:
sudo a2ensite fastway.conf sudo systemctl reload apache2
Add to
/etc/hosts:127.0.0.1 fastway.local -
Access application:
- Default:
http://localhost/fastway-app - Virtual host:
http://fastway.local
- Default:
-
Install Apache and PHP:
sudo yum install httpd php php-curl php-json php-mbstring
-
Start and enable Apache:
sudo systemctl start httpd sudo systemctl enable httpd -
Configure firewall:
sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --reload
-
Copy application:
sudo cp -r fastway-app /var/www/html/ sudo chown -R apache:apache /var/www/html/fastway-app
-
Set SELinux permissions (if enabled):
sudo chcon -R -t httpd_sys_content_t /var/www/html/fastway-app sudo chcon -R -t httpd_sys_rw_content_t /var/www/html/fastway-app/logs
-
Access application:
http://server-ip/fastway-app
Advantages:
- High performance
- Low memory usage
- Modern architecture
-
Install Nginx and PHP-FPM:
sudo apt update sudo apt install nginx php-fpm php-curl php-json php-mbstring
-
Copy application:
sudo cp -r fastway-app /var/www/ sudo chown -R www-data:www-data /var/www/fastway-app
-
Configure Nginx:
Create:
/etc/nginx/sites-available/fastwayserver { listen 80; server_name fastway.local; root /var/www/fastway-app; index index.php index.html; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; } location ~ /\.ht { deny all; } location /api/config.php { deny all; } }
-
Enable site:
sudo ln -s /etc/nginx/sites-available/fastway /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl reload nginx
-
Access application:
http://fastway.local
Visit the system check page:
http://your-url/system-check.php
This will verify:
- PHP version
- Required extensions
- File permissions
- Internet connectivity
- Configuration files
Test Tracking:
- Go to Track Parcel page
- Enter:
Z60000983328 - Click "Track Parcel"
- Verify results appear
Test Quote:
- Go to Get Quote page
- Enter:
- Suburb: Sandton
- Postal Code: 2196
- Weight: 2.5
- Delivery Type: Express
- Click "Calculate Quote"
- Verify quote results appear
Security Hardening:
-
Disable debug mode: Edit
api/track.phpandapi/quote.php:ini_set('display_errors', 0);
-
Enable HTTPS: Uncomment in
.htaccess:RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
-
Restrict file access: Ensure
.htaccessis active and working -
Set proper permissions:
# Files should be readable, not writable by web server find . -type f -exec chmod 644 {} \; find . -type d -exec chmod 755 {} \; # Logs directory writable chmod 755 logs
Ubuntu/Debian:
sudo apt install php-curl
sudo systemctl restart apache2CentOS/RHEL:
sudo yum install php-curl
sudo systemctl restart httpd# Fix ownership
sudo chown -R www-data:www-data /var/www/html/fastway-app
# Fix permissions
sudo chmod -R 755 /var/www/html/fastway-app
sudo chmod -R 755 /var/www/html/fastway-app/logs# Enable mod_rewrite
sudo a2enmod rewrite
sudo systemctl restart apache2
# Check Apache config allows .htaccess
# In /etc/apache2/sites-available/000-default.conf:
# AllowOverride All (not None)Check that mod_rewrite is enabled and .htaccess is being read:
sudo a2enmod rewrite
sudo systemctl restart apache2Enable PHP error display temporarily:
# Add to php.ini
display_errors = On
error_reporting = E_ALL
# Restart web server
sudo systemctl restart apache2To remove the application:
# Stop web server (if using Apache)
sudo systemctl stop apache2
# Remove files
sudo rm -rf /var/www/html/fastway-app
# Remove virtual host (if created)
sudo rm /etc/apache2/sites-available/fastway.conf
sudo rm /etc/nginx/sites-available/fastway
sudo rm /etc/nginx/sites-enabled/fastway
# Restart web server
sudo systemctl start apache2
# or
sudo systemctl start nginxTo upgrade to a new version:
-
Backup current installation:
cp -r fastway-app fastway-app-backup
-
Backup logs:
cp -r fastway-app/logs logs-backup
-
Extract new version:
# Remove old files except logs rm -rf fastway-app/!(logs) # Copy new files cp -r new-version/* fastway-app/
-
Restore logs:
cp -r logs-backup/* fastway-app/logs/ -
Test: Visit
system-check.php
If you encounter issues:
- Check
logs/error.log - Visit
system-check.php - Review browser console (F12)
- Check web server error logs
- Refer to README.md and SOP.md
Installation guide last updated: January 2026