Reputation: 236
I am using linux and every time I start the session I must put this command to start the symfony server
php bin/console server:start
Can you think of a way to automate this process?
Thank you
Upvotes: 0
Views: 150
Reputation: 488
If you are using apache and Linux there will be a folder /var/www/html/. Place your code in the folder and call the project directly from the browser as localhost/project_name/web/app_dev.php . Or as @Aleem says, set up a virtual host in your system. Edit : On xampp, I think the folder is htdocs or something.
Upvotes: 1
Reputation: 161
I think the best way to do this would be to get rid of the server:start command and setup a virtual host. Once you setup a virtual host, you should be able to access the website with the url you define. Something like http://yousite.local. If you are not sure on how to create virtual hosts. The following articles helps you.
Hope this helps.
Upvotes: 1
Reputation: 726
One solution is to write a script that launch the server and place this script in /etc/profile.d
/etc/profile.d/your_script.sh
Exemple for the script.sh
cd /path/to/your/symfony/project;
php bin/console server:start
More info
https://help.ubuntu.com/community/EnvironmentVariables#A.2Fetc.2Fprofile.d.2F.2A.sh
Upvotes: 1