I want to set up symfony3 on cloudways. Path for application folder is /home/master/applications/[appName]. pwd in this dir: conf logs private_html public_html ssl tmp.
As this link says I should install symfony application in public_html. However, I know that public_html is the same as web. So an application should not live in that folder. So, I think to install folder directly in /home/master/applications/[appName] and change 'web' directory to public_html. Is that right? Do not other existing folders (conf, logs) interfere symfony app?
Update: I am going to setup a git repo for symfony app on server. So if symfony should be installed in public_html/../ then all other files also will be tracked by git. I do not think that ssl should be tracked. Sure, I can add it to gitignore, but anyway.
I am from cloudways. Let me tell you the whole process, Cloudways is a managed hosting so there are some restrictions. You can't install symfony in: /home/master/applications/[appName]. You need to move in Public_html which is not a typical public directory. Install Symfony in this folder and don't worry your other files are not exposed beside the web folder. Every file is securely hidden and the whole process is also tested by Symfony officials.
After installing symfony in public_html folder, you can point out the URL to web directory:
Again nobody will have access to your files they are protected.
You can add .gitignore file to avoid unusual files to be tracked. I created some tutorials you can take guidance from them. here is the URL: https://www.cloudways.com/blog/php/symfony/.
The web directory is the directory Symfony is served out of via the frontend controller app.php (or app_{env}.php for non-prod). This is separate in philosophy from where your web server serves from (apache, nginx, etc). The directory structure ultimately doesn't matter much in either case so long as you point your web server to the correct directory where your frontend controller lives.
This is a good starting point: http://symfony.com/doc/current/setup/web_server_configuration.html
Related
Can someone help me... When I run firebase deploy it's deploying my static folder to hosting, but when I open website url in browser and check source files, there all my files with configs and components, tokens for DB as well. It is not safe at all... everybody can view all source files. How I can deploy so that nobody can view config files etc?
The Firebase CLI will deploy everything you put in the "public" folder by default. Once that folder is published, everything is, as you observed, public information.
If you don't want a file to be deployed, you should either remove it from the public folder, or tell the CLI to ignore that file for deployment using the ignore configuration in firebase.json.
I have a .net4 web api that I published to azure site, in my development environment, I have a file (data.csv) that I reference to for small checking type of action, I put it under C:\Program File\IIS Express folder and it works. So where should I put this file on the azure web site?
I see there are the following folders on the web server:
/site
deployments/
locks/
wwwroot/
bin/
Content/
Scripts/
Views/
I tried a few places, but no success, so where should I place this data.csv file?
In content and reference it as "~/Content"
What you are probably doing is using Directory to get current directory which takes the path where the application is running. If you didn't use IIS it would probably be in bin/Debug/etc
I have a virtual directory in IIS. and I added a new file to the physical directory that the virtual directory points to.
but when trying to access this file through the virtual directory - I get file not found (404).
I tried to restart the web site and the IIS Server - but it didn't help.
the file is a css file.
There may be permissions error on accessing the file so.
First set the permissions to full control over read /write..(Options->Security->...)
https://support.microsoft.com/en-us/kb/315122
You should generally put your static files under the Content folder in an MVC application. By default, this folder will be configured to skip the MVC routing rules. Google for MVC Content folder for more information.
At work we have an ASP.NET MVC application with a 'Notifications' namespace and accompanying folder.
The problem comes when trying to access /notifications - IIS it tries to serve files out of the notifications folder, instead of invoking the site's default application.
This is not a problem when deploying because the code folders aren't deployed, but during development, IIS sees the folder and tries to serve it.
Does anybody know how to make it just serve the default ASP.NET application for the folder? The closest I got was setting up a virtual folder, but that doesn't work because of the web.config inheritance behavior.
I'm afraid the only way to fix this is to rename either your folder or your controller. They can't be the same name because IIS looks inside of the folder first, and then if the folder does not exist, it goes to the ASP.NET ISAPI which then routes it to your controller.
Reference: http://forums.asp.net/t/1781586.aspx?+Help+Controller+not+getting+hit
Sorry :(
I need to integrate a third party plugin in my asp.net website. To install the plugin, they have mentioned this sentence, "Create an application through your IIS control panel with root directory at -(some path from my website folder)?".
I am not much aware with IIS and rarely worked with it. Though I tried every possible way I could do in IIS, I am not able to work it out. After installation, there is a test page provided by plugin which I have to run to check but when I run it, it shows this error.
"It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS."
I searched this error too and found that it is because the two Web.Config file, one from the main project and another from plugin folder. The only way to work with this, is to make the plugin folder they specified as a root directory in IIS. Someone kindly tell me some easy steps to do this.
What I was doing is, in IIS6, I added New website with the main folder of my asp.net website, then I right click>add application and choose the given path, thought it would become root directory but it is not.
Help would be appreciated. Also note that, I have to put the plugin folder in my main website folder only. So, there are two web.config. I tried to rename one of them too, it solved the above error but gave another errors but I think main problem is of root directory. P.S they show me above error on web.config file of plugin folder on this sentence-
"Line 51:
< authentication mode="Windows" />"
Most of the times the root directory is C:\inetpub\wwwroot folder and "Default Web Site" on IIS Manager.
Open IIS Manager and under Sites there should be IIS websites and under it you will probably see Default website. You can see the root directory with Right click/Settings.
Copy your website files under this root directory.
And after copying folder to root folder you will see this folder under Default websites on IIS.
Right click your directory name on IIS and "Create Application", select correct .net framework.
It should be work. Good luck, if you need more help please give more details on your server IIS.