Category : ssl

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 have a domain: www.example.com My Laravel 8 Production Project is setup to "force" SSL on the URL. I have set this up as follows: public/.htaccess #SSL force RewriteEngine On RewriteCond %{HTTPS} !on RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] and app/Providers/AppServiceProvider public function boot() { if($this->app->environment(‘production’)) { URL::forceScheme(‘https’); } } my .env file APP_NAME=NameOfApp APP_ENV=production APP_KEY=*hidden* APP_DEBUG=false ..

Read more

I am trying to upload a zip file from admin panel and couldnt figure out whats the problem below is the nginx error log Stack trace: #0 /var/www/app/Http/Helpers.php(625): IlluminateFoundationBootstrapHandleExceptions->handleError() #1 /var/www/storage/framework/views/72d4631affd952c4e3bee9501b68e8bee4272705.php(10): getBaseURL() #2 /var/www/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(107): require(‘/var/www/storag…’) #3 /var/www/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php(108): IlluminateFilesystemFilesystem::IlluminateFilesystem{closure}() #4 /var/www/vendor/laravel/framework/src/Illuminate/View/Engines/PhpEngine.php(58): IlluminateFilesystemFilesystem->getRequire() #5 /var/www/vendor/laravel/framework/src/Illuminate/View/Engines/CompilerEngine.php(61): IlluminateViewEnginesPhpEngine->evaluatePath() #6 /var/www/vendor/facade/ignition/src/Views/Engines/CompilerEngine.php(37): IlluminateViewEnginesCompilerEngine->get() #7 /var/www/vendor…PHP message: PHP Fatal error: Uncaught ErrorException: ..

Read more

I am facing a issue when trying to connect to gcloud postgres db allowing ssl in my laravel application which is running in the cloud run. I downloaded all three cert files from gcloud and set the path in config/database.php. ‘driver’ => ‘pgsql’, ‘host’ => env(‘DB_HOST’, ‘127.0.0.1’), ‘port’ => env(‘DB_PORT’, ‘5432’), ‘database’ => env(‘DB_DATABASE’, ‘forge’), ..

Read more

I deployed my website, and used this code to enforce that the protocol used is HTTPs IlluminateSupportFacadesURL::forceScheme(‘https’); in the AppServiceProvider. When I visit my website, it uses HTTP by default and I have to manually change ‘http’ to ‘https’ in the address bar and then the SSL certificate works fine and I can fill all ..

Read more

I am trying to run Certbot on a Laravel Forge server. This is the error I keep receiving nginx: [emerg] cannot load certificate "/etc/nginx/ssl/mydomain.ca/1263486/server.crt": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE) nginx: configuration file /etc/nginx/nginx.conf test failed from my understanding, this means the first line says BEGIN CERTIFICATE rather than TRUSTED CERTIFICATE, how ..

Read more

I have a Laravel project in which I’m using the GoCardless API with the PHP Client wrapper from https://github.com/gocardless/gocardless-pro-php. I have set it up very simply like so. <?php namespace AppHttpControllers; use IlluminateHttpRequest; use GoCardlessProClient; class PaymentController extends Controller { /** * Display the index page where we begin a payment flow. */ public function ..

Read more

I’m trying to set up an SSL connection between two servers (Laravel and MySQL 8). The options in database.php for this connection are: ‘db_connection’ => [ ‘driver’ => ‘mysql’, ‘host’ => ‘192.168.0.1’, ‘port’ => ‘3306’, ‘database’ => ‘my_db’, ‘username’ => ‘my_user’, ‘password’ => ‘my_password’, ‘charset’ => ‘utf8mb4’, ‘collation’ => ‘utf8mb4_unicode_ci’, ‘prefix_indexes’ => true, ‘strict’ => ..

Read more

im trying to use MongoDB atlas On Laravel, i already set up the databases and got this error : No suitable servers found (serverSelectionTryOnce set): [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed calling hello on ‘HOST’] [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed calling hello on ‘HOST’] [TLS handshake failed: error:1416F086:SSL routines:tls_process_server_certificate:certifi am i missing ..

Read more

I am getting this error, I have created certificate file and private key file, this error in php laravel route, I want solution of this. please help me to resolve this issue. Route::get(‘/twoway_auth’, function(){ $url = ‘https://preprodb2b.alinma.com’; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_PORT , 4443); curl_setopt($ch, CURLOPT_VERBOSE, 0); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_CAINFO, ..

Read more

We have built a multisite PHP Laravel network hosted on DigitalOcean, we are currently using Cloudflare’s Free SSL certificate, however, this certificate only covers the primary domain and its subdomains, it’s not able to secure a completely different domain. From initial research I found out that we require a SAN SSL certificate to be able ..

Read more

I’ve developed an web application using laravel on local host, I’ve configured app using port forwarding method on my static public ip and it’s working fine. Similarly I’ve one hosting and domain in hostinger there I’ve created one sub domain and change target ip to my public ip where I’ve configured port forward and it’s ..

Read more

i want to integrate stripe in my laravel project, it gives me error: cURL error 77: error setting certificate verify locations: CAfile: D:wamp64binphpphpphp7.3.5extrassslcurl-ca-bundle.crt CApath: none (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.stripe.com/v1/charges?amount=0&currency=CAD&description= Order`, I found some solution such as: here and I notice that most of the question ask for … sslcacert.pem CApath: none .. but me it ..

Read more

I am trying to test make a call to an API and when I tried via postman with URL something like: https://exampleapi.com/domains/availability?domain_names[]=dummydomains.com&domain_names[]=exampledomain.com and two headers: Api-Request-Id, Api-Signature, it does work, but now when I try using guzzle HTTP (laravel 8) as: $response = Http::withHeaders([ ‘Api-Request-Id’ => self::getRequestId(), ‘Api-Signature’ => self::getSignature(), ])->retry(3, 100)->post(config(‘services.reseller.api_url’).’/domains/availability’, [ ‘domain_names[]’ => ..

Read more