0

When I head over to my public DNS and attempt to load an Auth route, it sends me to http://localhost:8080/ExoscapeWebsite/public/login. Inside of my .env file, I have altered the APP_URL to my public DNS:

APP_URL=http://exoscape.co.uk

I am using NGINX to load Laravel by proxy_pass since I couldn't get try_files working so I stuck with using Apache2. My NGINX configuration looks like this:

server {

    server_name exoscape.co.uk;

    location / {
        proxy_pass http://localhost:8080/ExoscapeWebsite/public/;
    }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/exoscape.co.uk/fullchain.pem; # manag$
    ssl_certificate_key /etc/letsencrypt/live/exoscape.co.uk/privkey.pem; # man$
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

Any ideas on how I could change the hostname in Laravel so it continues with the correct domain?

Jaquarh
  • 6,493
  • 7
  • 34
  • 86
  • `php artisan cache:clear` and `php artisan config:cache `, perhaps it helps – Karan Sadana Apr 27 '19 at 05:41
  • Sorry forgot to mention I did that already, also, of I navigate to my domain/login, i receive a 404 error @KaranSadana – Jaquarh Apr 27 '19 at 05:57
  • can you show , how you give link. – Karan Sadana Apr 27 '19 at 06:02
  • https://exoscape.co.uk/login @KaranSadana – Jaquarh Apr 27 '19 at 06:04
  • i guess your issue is mode rewrite. https://askubuntu.com/questions/541105/nginx-over-apache-with-laravel-give-rewrite-mod-problems follow this – Karan Sadana Apr 27 '19 at 06:05
  • yes, change the 'url' value in config/app.php `config/app.php` – Karan Sadana Apr 27 '19 at 06:17
  • I'm a little confused. Are you wanting to access your laravel app on your local machine with `exoscape.co.uk` or a remote server? – Rwd Apr 27 '19 at 08:15
  • Sorry, yes. My Domain is pointed towards my NGINX server, I’m using NGINX as a load balancer since my server has 2 web servers running. I want to access the local machine files for Laravel, I am using PHP7.0 but following the tutorial gives me errors thus I used proxy_pass to Apache but now this doesn’t let me load more URLS and points towards the proxy domain @RossWilson – Jaquarh Apr 27 '19 at 08:18
  • Ok. Which tutorial(s) have you been following and what are the errors you're getting? Your question is currently quite broad so we'd need a way to narrow down the issues. Also, just an FYI, `APP_URL` doesn't have anything to do with normal HTTP requests (https://stackoverflow.com/questions/31129092/what-is-the-significance-of-application-url-in-laravel-5). – Rwd Apr 27 '19 at 08:24

0 Answers0