Category : apache

I want to force https SSL on my Laravel 8 production project. Adding this to htaccess does the job for me. #Force SSL RewriteCond %{HTTPS} !on RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] I also added this to the boot method of the AppServiceProvider if($this->app->environment(‘production’)) { URL::forceScheme(‘https’); $this->app[‘request’]->server->set(‘HTTPS’, true); } Now, Laravel 8 creates a default htaccess file ..

Read more

I am trying to deploy my Laravel application on AWS using docker image by following given tutorial: https://medium.com/@okekedesmond/deploying-containerized-laravel-application-using-aws-ec2-instances-with-docker-and-rds-883e8f6d6245 I am stuck at first point while building docker image. Here is my Dockerfile: # Defining the base image for our project, if you understand how docker images and layers work, this should not be difficult to ..

Read more

I have a Laravel project where I use a Symfony StreamedResponse with a callback to stream some programmatically generated output to the client. For development the web-server runs on the same machine as my IDE and my browser, i.e. the browser accesses the Laravel project via http://myproject.localhost/. Only in this setup, the content is not ..

Read more

when I try to show instagram images on our web application i get this error: The resource at “https://scontent-dus1-1.cdninstagram.com/v/t51.2885-19/s150x150 /269430179_619307746060977_8863061929784384401_n.jpg?_nc_ht=scontent-dus1-1.cdninstagram.com& _nc_cat=109&_nc_ohc=B7qUhQC8GZkAX9zaHp6&edm=APwHDrQBAAAA&ccb=7-4& oh=00_AT8PPmyxQt8DqIAf8z4oKqY1VKWSX0Gh04M_pcVFDltIHQ&oe=61D10099&_nc_sid=1c538d” was blocked due to its Cross-Origin-Resource-Policy header (or lack thereof). See https://developer.mozilla.org/docs/Web/HTTP/Cross-Origin_Resource_Policy_(CORP)# html tag: <img src="https://scontent-dus1-1.cdninstagram.com/v/t51.2885-19/s150x150/269430179_619307746060977_8863061929784384401_n.jpg?_nc_ht=scontent-dus1-1.cdninstagram.com&_nc_cat=109&_nc_ohc=B7qUhQC8GZkAX9zaHp6&edm=APwHDrQBAAAA&ccb=7-4&oh=00_AT8PPmyxQt8DqIAf8z4oKqY1VKWSX0Gh04M_pcVFDltIHQ&oe=61D10099&_nc_sid=1c538d" crossorigin="anonymous" alt=""> after implementing and setting up Laravel Cors i get error again, my Laravel Cors configuration ..

Read more

I’m currently having a problem getting websockets set up with socket.io from React to Laravel using laravel-echo-server. Everything appears to be working except whenever I navigate to https://api.mysite.com/socket.io/?EIO=4&transport=websocket I’m getting an Internal Server Error. And whenever I check the logs, this is the error: AH01144: No protocol handler was valid for the URL /socket.io/ (scheme ..

Read more

I’m currently using laravel-echo-server and websockets (socket.io) to broadcast events to my React application that is on a separate server. As far as it looks, everything set up on the back end and front end are correct. The only issue I’m running into is not being able to connect to websockets (https://api.mysite.com:6001/socket.io/?EIO=4&transport=websocket). I’m getting ERR_CONNECTION_REFUSED. ..

Read more

// in docker-compose.yml version: ‘3.8’ services: database: image: mysql container_name: database restart: always environment: MYSQL_ROOT_PASSWORD: example volumes: – ./mysql:/var/lib/mysql ports: – ‘3306:3306’ php-apache: container_name: php-apache build: context: ./php ports: – ‘8080:80’ volumes: – ./src:/var/www/laravel_doc – ./apache/default.conf:/etc/apache2/sites-enabled/000-default.conf depends_on: – database // in php Dockerfile FROM php:7.4-apache RUN apt-get update && apt-get install -y libmcrypt-dev mysql-client libmagickwand-dev ..

Read more

i’m trying running app for convert file from docx to pdf with FileConverter . first of all i trying this command running with cmd and running perfectly "C:Program FilesFile ConverterFileConverter.exe" –conversion-preset "To Pdf" "C:UsersDocumentstesttest-document.docx" when i convert this command to running at php with function exec() the app is getting stuck but the app it ..

Read more

I have an Apache2 virtual host where I’ll be hosting several Laravel applications. The VH document root is /home/user/applications/portal. The laravel applications are in: /home/user/applications/portal/larapps/larapp1 /home/user/applications/portal/larapps/larapp2 … I want the URLs to be like: http://myserver.com/larapp1/… http://myserver.com/larapp2/… So this is my config: <VirtualHost *:80> ServerName portal ServerAdmin [email protected] DocumentRoot /home/user/applications/portal Alias /larapp1 /home/user/applications/portal/larapps/larapp1/public <Directory /home/user/applications/portal/larapps/larapp1/public> RewriteEngine ..

Read more

I have updated GoDaddy SSL certificate and key in my Apache server (2.4) on Linux Debian server (9.13) as well as configuration file in /etc/apache2/sites-enabled/. However, when I go to my Laravel (5.4) website, I’m getting the following error in the console: crbug/1173575, non-JS module files deprecated. and ERR_CONNECTION_REFUSED in Google Chrome. How should I ..

Read more

I have updated GoDaddy SSL certificate and key in my Apache server (2.4) on Linux Debian server (9.13) as well as configuration file in /etc/apache2/sites-enabled/. However, when I go to my Laravel (5.4) website, I’m getting the following error in Google Chrome’s console: crbug/1173575, non-JS module files deprecated. And ERR_CONNECTION_REFUSED in the browser’s main window. ..

Read more

It works all good on my Local server. But on my Production server POST request body is empty as Content-Type header is being removed by my server somehow before it hits my Laravel site. (I have dumped headers at the top of public/index.php file but All other headers are there except ‘Content-Type’. Hence, $request->all() is ..

Read more

I’m build Laravel using Docker. And I want to Apache Restrict Access by IP. My apache config file: <VirtualHost *:80> DocumentRoot /var/www/html/web/public </VirtualHost> Laravel htaccess file (./public/.htaccess) Options -MultiViews -Indexes RewriteEngine On order deny,allow deny from all allow from ::1 allow from 127.0.0.1 allow from localhost # RewriteCond %{REQUEST_URI} !^public # RewriteRule ^(.*)$ public/$1 [L] ..

Read more