#### Category : nginx

I am trying to display my logs on my website to verified users in Laravel based on my role based access control. $file = fopen("/var/log/auth.log", "r") or die();$content = fread($file, filesize("/var/log/auth.log")); fclose($file); This hits me with an error: fopen(/var/log/auth.log): failed to open stream: Permission denied I can see that Laravel does not have the ..

I am uploading my application build in Laravel to Digitalocean for the first time and I am having the problem that when I enter my application by typing pedisimple.com it works perfectly, but when I enter www.pedisimple.com it returns a 404 error … I have the records as they should be: Record A => pedisimple.com ..

I have a problem with the file uploadings. I use a form to upload images and if I check the folder, I can see it and everything seems correct: All the files with timestamp 10:44 come from a git clone. The file created at 10:55 comes from the form. I can access all of them ..

I just install my nginx server on my windows laptop. Then I setup the nginx.conf file like this : server { listen 80; server_name laravelninja.local; root C:/blablabla/public; index index.php; location ~ .php${ fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME$document_root$fastcgi_script_name; include fastcgi_params; } } running the php-cgi using this syntax php-cgi.exe -b 127.0.0.1:9000 and the .. Read more We are running a laravel application by docker. We are creating a docker container using PHP-FPM (php:7.0-fpm official image) & NGINX. We use a common .env file for both docker and laravel applications. we up & running our application by – docker-compose –env-file=./.env -f docker-compose.yml up -d But the problem is when we change our .. Read more I’m trying to set up an staging environment (I also intend to set up a production futhermore) for a Laravel 8 application. almost everithing is working as I expected, except for a problem caching the routes and with something wrong on nginx configuration. I created a laravel.conf file on .platfom/nginx/conf.d/elasticbeanstalk folder with the following content: .. Read more I have been working on a e-learning project for a few days and I have been trying to update it to elastic beanstalk, locally, everything works perfectly but I can not play the videos uploaded to the database nor open videos or audios. When I use it locally it works but on the server it .. Read more I have a Laravel application running on my Ubuntu 18.04 server and MySql 5.7. Sometimes, it is very slow. I have chekded with "top" command and this is the result: Some times %cpu raises over 140% for mysqld command, and my sites are almost death (I thhink this is the cause). What should i do .. Read more I have a nuxt application SPA for the front end and a laravel API. Nuxt calls on API for request. I am trying to deploy this in one digital ocean droplet but I am having problems with it. My laravel application seems to be working but I cant get nuxt to show here is my .. Read more I started testing the new Laravel Sail docker-compose environment with an nginx reverse proxy so I can access my website from a real tld while developing on my local machine. My setup is: OS – Ubuntu Desktop 20 with nginx and docker installed. Nginx site-enabled on the host machine: server { server_name mysite.xyz; listen 443 .. Read more I’m unable to replicate this issue in development, but in production I’ve noticed that responses from controllers will intermittently return what appears to be urlencoded data instead of redirecting or showing JSON. For example, the login controller will intermittently return urlencoded data instead of redirecting to the dashboard page. I have literally no idea what .. Read more I have a Laravel project deployed with Laravel Forge in nginx. This application has several aliases. I am trying to issue ssl certificates for each aliases, but I get the following error: ERROR: Challenge is invalid! (returned: invalid) (result: ["type"] "http-01" ["status"] "invalid" ["error","type"] "urn:ietf:params:acme:error:unauthorized" ["error","detail"] "Invalid response from example.com/.well-known/acme-challenge/xxxxxxxxxxxxxxx [xxx.xx.xxx.xx]: "u003c!DOCTYPE html PUBLIC \"-//W3C//DTD .. Read more Having followed [https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-nginx-in-ubuntu-18-04][1] I have created serverblock as server { listen 80; server_name example.com; return 301 https://example.com$request_uri; } server { listen 443 ssl; listen [::]:443 ssl; server_name example.com; root /var/www/html/exampleserver/public; #<ssl_certs> include snippets/self-signed.conf; include snippets/ssl-params.conf; ssl_stapling off;#switch to on if real cert ssl_stapling_verify off;#switch to on if real cert #</ssl_certs> fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; ..

I’m currently using the default configuration below, provided by Laravel here: server { listen 80; server_name www.example.com; root /srv/www/example/public; add_header X-Frame-Options "SAMEORIGIN"; add_header X-XSS-Protection "1; mode=block"; add_header X-Content-Type-Options "nosniff"; index index.php; charset utf-8; location / { try_files $uri$uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log .. Read more Ubuntu 20.04 Docker version 19.03.14 docker-compose version 1.25.0 I’m trying to figure out why i’m getting an error related to mysql. The steps i did: Clone my laravel project docker-compose build docker-compose up -d docker-compose exec app php artisan key:generate docker-compose exec app php artisan config:cache docker-compose exec app php artisan migrate in the last .. Read more I have this laravel directory stucture: /app … [another-default-laravel-structure] … /dist /public My current Nginx setting is like this: server { # Make site accessible from http://localhost/ server_name example.com; error_log /some/path/to/logs-file.log; location / { # First attempt to serve request as file, then root /home/user/laravel-project/dist; index index.php index.html index.htm; # as directory, then fall back .. Read more Hello I have a laravel application behind nginx proxy pass, here’s the configuration Nginx Proxy Pass location /api { # reverse proxy for app proxy_pass http://10.104.0.2/api; proxy_http_version 1.1; proxy_set_header Upgrade$http_upgrade; proxy_set_header Connection ‘upgrade’; proxy_set_header Host $host; proxy_cache_bypass$http_upgrade; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For$proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_redirect default; proxy_redirect /api$scheme://\$http_host/api/; } location ..

I never seen this issues beore, I have a Laravel app. When I tried to log in, I kept seeing 404. I checked laravel.log while logging in, I see nothing. web.php Route::get(‘/’, function () { return redirect(‘login’); })->name(‘home’); Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/dashboard’, function () { return redirect(‘clients’); })->name(‘dashboard’); Live: http://192.81.216.234/login Hint: I already triple check the password, ..

I never saw this issue before, I have a Laravel app. When I tried to log in, I kept seeing 404. I checked laravel.log while logging in, I see nothing. web.php Route::get(‘/’, function () { return redirect(‘login’); })->name(‘home’); Route::middleware([‘auth:sanctum’, ‘verified’])->get(‘/dashboard’, function () { return redirect(‘clients’); })->name(‘dashboard’); Live: https://awningapp.com/login Hint: I already triple check the password, ..

Please dont mark the question as duplicate as we already tried other solutions on stack overflow but couldnt worked for us . We are having issues while redirecting our Domain url from http to https . When we hit the http://example.com ,it is not getting redirected to https://example.com . We have also set up a ..

I have an issue with my nginx and laravel app. Every time nginx forward the request to laravel app the payload with special characters becomes blank even the headers of the request are correct. Below is the sample payload: { "request": { "id": 1, "name": "Féminine" } } and headers of this request are: { ..

Quick question, shouldn’t be too hard… hopefully. I’m running Nginx with two Laravel projects being hosted. The following directories are where they are being stored. /var/www/site.kara /var/www/site.arkmanager The location of the projects are http://10.0.0.2/kara and http://10.0.0.2/arkmanager. The site.kara laravel project is loading images just fine. However I have an issue with the site.arkmanager locating images ..