The symfony is in /Frameworks folder, and the root path is in Apache2/htdocs/, how to deploy a symfony project? Do I need to copy symfony folder to htdocs, condisdering Apache2/htdocs/ like localhost/?
You can copy your Symfony folders in the htdocs folder and set Apache to serve from Symfony's 'web' folder which contains the app.php file.
You need to do some Apache configuration here, you can check this post
Related
I want to deploy my nuxt.js project on a windows server, plesk shared web host.
I have done the following steps:
I have build project using 'node_modules/nuxt/bin/nuxt-start'
copy .next folder to httpdocs folder in server
copy 'nuxt.config.js' to httpdocs folder
copy 'package.json' to httpdocs folder
deleted web.config file
In the field Application Startup File you have to put node_modules/nuxt/bin/nuxt-start
installed npm packeges on server
but it does not run on the server and I get the following error:
This site can’t be reached
what is wrong?
What are the correct steps to deploy nuxt project on plesk?
Thank you
I installed Symfony on my local host and it is working like a charm.
But when I upload the project folder via php to my shared host it is not working.
I see only the message: This site is currently under construction.
I am using the right php version (7.1.)
This is my folder structure.
.DS_Store
.env
.env.dist
.git
.gitignore
assets
bin
composer.json
composer.lock
config
package.json
phpunit.xml.dist
public
src
symfony.lock
templates
tests
translations
var
vendor
webpack.config.js
I have a Symfony 3 app that I need to deploy to a shared hosting server - hostgator. I have copied all of the contents from the web folder into the public_html folder. I also copied all the other folders on the root of my directory. However, I does not run.
Did you check the proper permissions in particular the var/ folder, this is described on this page.
Also, if they use apache, you will have to set the owner:group of the web folder properly.
In Linux that is done easily by this command (from the root folder):
$ chown -R apache:apache web/
Try that out (you might need sudo access to run chown).
I am developing a Symfony2 web app that will be hosted on an Ubuntu server and want my directory structure to be:
/Symfony (with an app,bin and vendor folder in it)
/Site1
/Site2
This way site1 and site2 use the same Symfony framework. In /Site1 I want:
/web
and in there I want app.php and app_dev.php as well as /web/AppBundle with all of the bundle files. I already figured out that I need to change in app.php require_once DIR.'/../Symfony/app/AppKernel.php'; in 2 places as per http://symfony.com/doc/current/cookbook/configuration/override_dir_structure.html
When I generated the bundle I did get the message "Checking that the bundle is autoloaded: FAILED" and that I should "Edit the composer.json file and register the bundle namespace in the "autoload" section"
I added "AppBundle": "/web/AppBundle" to the composer.json autoload section and in cygwin I run "composer -n install" It starts with saying that it is loading composer repositories and then it says "Installing dependencies (including require-dev)" and never goes past that.
What can I do to register this bundle that is not in the standard folder so that autoload picks it up? I am just getting the fact that the class could not be found in AppKernel.php
Thanks.
It's simple. Just don't do it! Use symfony as it is intended with its default directory structure.
Great two projects. If you have common code, extract it to an extra bundle and install it in both projects via composer.
Because of an other problem on my server, I tried to setup a real new project and did this (localhost with xampp on windows):
installed curl
loader composer like told in docs
loader vendors like told in docs
merged app/config-folder
copied src-folder
copied web/bundles/myBundle-folder
After that, I tried the deployment-steps documentation. I skipped uploading the files and editing parameter.yml (it's already configured for localhost).
Than I am running into trouble doing 'B) Update your vendors':
php composer.phar install --optimize-autoloader
This steps remove all my files from the web\bundles\myBundle-folder.
Do I have to tell composer about my bundle? I first thought, that I have to store them somewhere else, but this thread tells me, that I am right?!
The thread you are mentioning is from symfony 1, but you are installing a symfony 2 application.
In web/bundles are your assets installed (css, javascript and images).
Your bundles which will be installed via composer are in your vendors folder.
And your own bundles should be in the src folder.
I think this is a good start to have a look at where to store your files.
Your css, js and images should be stored in a bundle, e.g.:
src/AcmeDemoBundle/Resources/public/css
src/AcmeDemoBundle/Resources/public/js
src/AcmeDemoBundle/Resources/public/images
And then you can install your assets with php app/console assets:install web and they will be pushed into the web/bundles folder.