Category : apache

I need to redirect my website from http to https. I follow aws guide (https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html) and now, if i add "https://" to url, it works. So i add a .config file in .ebextensions folder with this code: files: /etc/httpd/conf.d/http-redirect.conf: mode: "000644" owner: root group: root content: | RewriteEngine On RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteCond %{HTTP_USER_AGENT} !ELB-HealthChecker ..

Read more

i ve tried some methods to route my url rootdirectory/src/Simplex/app.php require __DIR__.’/../vendor/autoload.php’; use SymfonyComponentRoutingRoute; use SymfonyComponentRoutingRouteCollection; $routes = new RouteCollection(); $routes->add(‘ip’, new Route(‘/ip’, [ ‘IPAddress’ => "52.77.50.64", ‘_controller’ => ‘ControllerController::getIPResponse’, ] ) ); $routes->add(‘home’, new Route(‘/’, [ ‘IPAddress’ => "52.77.50.64", ‘_controller’ => ‘ControllerController::getIPResponse’, ] ) ); and rootdirectory/front.php require __DIR__.’/vendor/autoload.php’; use SymfonyComponentHttpFoundationRequest; $globals = (Request::createFromGlobals())->getPathInfo(); ..

Read more

I am not sure this the best practices for the project, so be kind ! Environment: On my laptop for the simulation (Ubuntu 20.4), but this is the same interactions on a remote server. I have 2 distinct Symfony APIs (ApiPlatform), api1 and api2 running with docker-compose so 6 containers (api1_php-fpm, api1_nginx, api1_mariadb, api2_php-fpm, api2_nginx, ..

Read more

I have a problem when deploying Symfony 1.4.28 on Apache2 (Ubuntu 18.04). I follow all instruction of Symfony tutorial here with 2 steps: Generate the structure of Symfony project (generate:project, generate:app) Edit /etc/apache2/apache2.conf (because Apache2 removed httpd.conf) to point this structure However, when I deploy, it doesn’t work with the message "Forbidden You don’t have ..

Read more

I have a multilingual website in Symfony with : http://localhost/en for english website (Default) http://localhost/fr for french website http://localhost/es for spanish website I want to rewrite my default route http://localhost to default website http://localhost/en. All my english routes must pass into http://localhost without /en code in url. For example: http://localhost/crews must display the content of ..

Read more

I have a symfony site. I have an image at: /var/www/site/public/images/QR/984746QR.svg Apache logs give a 404 [27/Oct/2020:13:24:11 +0200] "GET /images/QR/984746QR.svg HTTP/1.1" 404 which according to rewrite rules send it to Symfony: [27-Oct-2020 11:35:24 UTC] [error] Uncaught PHP Exception SymfonyComponentHttpKernelExceptionNotFoundHttpException: "No route found for "GET /images/QR/984746QR.svg"" at /var/www/site/vendor/symfony/http-kernel/EventListener/RouterListener.php line 136 So I am quite sure its ..

Read more