How can I get access to my Symfony app on my server? - apache

I cloned my Symfony app to my server and when I want to open the website I get the error:
Forbidden
You don't have permission to access this resource.
Apache Server at mywebsite.com Port 80
What does that mean?

I would check the owner of the files in terminal.
I would check vhost file, on my local Ubuntu the location is /etc/apache2/sites-available/

You could check if you didn't miss any important step from the webserver configuration documentation
Configuring a Web Server
like installing the apache Symfony pack or manually set an .htaccess

I had to link my domain to the public folder instead of the root folder

I'm gonna need more information about the system. Which symfony version do you have? Have you seen the loggers? Have you deployed the system on a docker container? Which version of PHP are you using? Maybe you are missing some dependencies.

Related

Apigility API path is not correct when installed with XAMPP

I've installed Apigility on my CENTOS box which has XAMPP installed to handle my web services. After successfully installing Apigility I can access the admin ui by going to http://00.111.222.33/apigility/public/, which is fine for the ui panel, but when I create an RPC api my path is http://00.111.222.33/apigility/public/ping which is not desirable. I'd like the path to be http://00.111.222.33/ping like how the Apigility tutorials show as an example.
My first thought is to configure the .htaccess rules, but not sure if that's what I should do.
Is installing Apigility in the htdocs the correct place?
Does Apigility have a place to configure the "pretty url"?
Not sure if the port has anything to do with things, but my CENTOS is configured to listen to port 5757.
You should make public the root folder of your webpage.
To do this,
You should go into your apache vhost file.
Here you can change the folder to include /apigility/public.
This way, the apigility ui is on / and the services you create are on /ping /....
The port does not matter.
A related question to this is: How to change xampp localhost to another folder ( outside xampp folder)?

How do I stop WANdisco Subversion conflicting with Apache24?

EDIT:
I did find out a few key things:
In Windows 7, (Maybe other OS's?) There is a hosts file. That hosts file controls custom local URL addresses. You can define a custom name for a local host URL. For example: mywebserver.localhost. If you want your browser to serve local files from your computer with a custom URL name, you can set that in the hosts file. The hosts file is located in Drive:\Windows\System32\drivers\etc. If you don't have permissions to write to that file, you'll get an error message stating the the file isn't found, or something like that when you try to save the file.
Apache has a conf folder with a file in it named: httpd.conf. That controls the configuration directives for Apache.
If you want to link PHP to Apache, PHP has a PHP.ini file that needs to be configured.
END EDIT
I installed WANdisco Subversion, for Windows7 32bit (Link for reference)
Subversion - Version Control
and it installed with APACHE 2.2 in a sub-folder.
The only reason I install Subversion, was that a Google help page:
Install the Google Client Library for PHP
stated that it was required to download the source code needed for the Google API PHP Client Library.
Then I installed PHP and Apache 2.4 in their own folders, and configured the C:\Apache24\conf\httpd.conf file to point to a local webserver. (Along with some other configurations)
YouTube install Apache on Windows 7
The path in my operating system is:
C:\Program Files\WANdisco\Subversion\Apache2\bin;C:\Program
Files\WANdisco\Subversion;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:Python27;C:Python27\Scripts;C:\php
The localhost in my web browser will load an HTML file from the Apache set up in the Subversion Directory, but not from the C:\Apache24 directory.
How am I going to keep both Apache installations, and get the localhost to load HTML files from someplace other than the C:\Program Files\WANdisco\Subversion directory? I'm tempted to just delete the Apache folder from WANdisco\Subversion. Or just unistall the whole Subversion software. I'll probably never use it again.
Sounds to me like you don't need a server install of Subversion, but only the client.
I'd suggest uninstalling the version you have an installing the Client only download, which won't come with Apache httpd.

Install Symfony on remote server

I'm trying to evaluate Symfony 2 (2.1.7). I'm installing it following the download instructions on an EC2 instance that is already running PHP 5.3.20 on Apache.
I'm stuck on the second step of the README.md: "Access the config.php script from a browser". The readme assumes a local installation and provides a sample URL to the localhost: http://localhost/path/to/symfony/app/web/config.php.
Since I'm on a remote server, I try to access the config.php file using the relevant URL: http://mysite.com/Symfony/app/check.php, which returns this message:
Forbidden
You don't have permission to access /Symfony/app/check.php on this server.
I tried to apply the answer from How do I access to symfony config.php remotely? by adding what PHP reports back as my REMOTE_ADDR, but that doesn't change the message.
What do I do now?
In symfony, the web folder is supposed to be your webroot. So, if you want to access \project\web\config.php, you should point your browser to http://www.example.com/config.php.
If that doesnt work, apache is probably configured incorrectly. make sure it it is pointed at your web directory, not your project directory.
edit As you mention in your question, you will also need to edit the config.php file to allow remote access. You can comment those lines out, or add your IP to the whitelist.
edit2 Many webhosts don't allow you to specify your webroot. In that situation, you can put the Symfony files in a different directory and create a symlink between the Symfony web directory and your webroot.

Where to find localhost files with Apache?

I recently installed Apache and enabled "localhost" with Windows. When I type "localhost" in my browser, it brings me to a page explaining that the Apache installation was successful. I just don't know where to find this. Is it reading some index.html file? If so, I just can't find it.
I tried going to C:\inetpub\wwwroot but the "localhost" in the browser is not reading it from this location. Where else is it reading localhost from? I use Windows 7.
This is usually found in \apache\htdocs on a Windows default install. The 'Pre-Installation' steps covered in this Apache, PHP and MySQL setup guide might be helpful.
If you use a default install of WampServer, it will be in C:\wamp\www

Is it possible to use apache tomcat server as a http file server >

I have installed apache tomcat server on my machine for hosting some servlets. Now I want to put some files on this server so that user can download these files straight away. My question is is it possible to do this ? I mean can apache tomcat server act as a http server as well ? If yes, in which directory in tomcat server I should put these files ?
Please help,
Several pointers (from Google):
http://denis-zhdanov.blogspot.com/2009/08/configure-tomcat-static-content.html
Stackoverflow: How to serve static content from tomcat
Enable the file listing in conf/web.xml and then delete all the files in webapps/root directory and replace it with the files you want to transfer.
The below link could be helpful
https://www.youtube.com/watch?v=pJPOBKLYZYY