CONFIGURE AND RUN SYMFONY (PHP) ON UBUNTU
Prerequisites: - Web server (Apache2)
Step #1:
Install composer by running:
$ sudo apt install composer
Step #2:
Create new symfony app example and save the app in (ex. /var/www/symfony):
$ cd /var/www/
$ sudo apt install php
$ sudo apt install php-xml
$ composer create-project symfony/skeleton symfony
$ cd symfony
$ composer require symfony/web-server-bundle --dev ^4.4.2
$ composer install
Step #3:
Run the server by run:
$ php bin/console server:run VPS.IP.ADDRESS:port
Output:
[OK] Server listening on http://VPS.IP.ADDRESS:port
// Quit the server with CONTROL-C.
PHP 7.2.24-0ubuntu0.19.04.2 Development Server started at ...
Listening on http://VPS.IP.ADDRESS:port
Document root is /var/www/symfony/public
Press Ctrl-C to quit.
Navigate to xxx.xxx.xxx:port url (where xxx.xxx.xxx is server ip, and where port is the selected port)
Related Tutorials
Installing ServerPilot and Creating an App on Ubuntu 14.04 LTS 64bitInstall Percona Server 5.7 MySQL on Ubuntu, CentOS or Debian
How to install ISPConfig panel on a VPS - Alternative of cPanel - free cPanel
Installing and Securing phpMyAdmin on Ubuntu 16.04 server
Installing NodeJS on an Ubuntu 16.04 VPS Server