Information:
This is built in Symfony 3.4.21
Using php 7.0.25

Set up instructions:
So first we set up the server, you can skip whatever bits you dont need. This is sitting up an apache2 server on ubuntu with dev self signed certificates so you can use https...

  • sudo apt-get install openssh-server
  • sudo apt-get ssh restart
  • sudo apt-get update
  • sudo apt-get install apache2
  • sudo a2enmod ssl
  • sudo a2enmod rewrite
  • sudo mkdir etc/apache2/ssl
  • sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt
  • nano /etc/apache2/sites-available mywebsite-ssl.conf

  • sudo a2ensite mywebsite-ssl.conf
  • sudo apt-add-repository ppa:ondrej/php
  • sudo apt-get update
  • sudo apt-get install -y php7.0
  • sudo apt-get install -y php7.0-xml
  • curl -ksS https://getcomposer.org/instraller | php
  • sudo mv composer.phar /usr/local/bin/composer
  • sudo chmod +x /usr/local/bin/composer

ok we now have all the bits we need before we start our symfony. Pays to be prepared!

  • cd /var/www/
  • symfony new blog 3.4
  • cd blog
  • composer install
  • HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
  • sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/sessions
  • sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var/cache var/logs var/sessions

if the last two lines cause issues simply create the directories: mkdir var/logs
mkdir var/logs
mkdir var/sessions
and re run the lines last 3 lines again

  • php app/console cache:clear -e prod
  • ifconfig

In the results for ifconfig will be a ip address. usualy something like 192.168.52.XXX so
...ens33 Link encap:Ethernet HWaddr 00:0c:29:12:de:6d inet addr:192.168.52.131 Bc.....
the last bit may vary but the 192.168 is standard.
This is your ip for your vm box. and your development web site.

Now on your windows box (assuming your accessing a linux box on vm ware or similar for dev purposes) run notepad as administrator (left click choose as run as administrator) then navigate to
This PC > Local Disk C: / Windows / System32 > drivers > etc
change the type of document from Text Documents to All Files
click on the file "hosts" and click open add the ip 192.168.52.131 www.blog.rpt on a new line and save it.
I tend to use rpt for development web sites because its readilly accepted by all browsers and very little used if at all currently.

  • sudo service apache2 reload
  • browse to https://www.blog.rpt
and you should see a symfony screen..