Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SilentTech's avatar

Laravel laradock Nginx Postgres Request Help

Hi everyone i have trouble accessing my site on browser i have already followed this steps but i cant able to run my project please help me:

Requirements PHP >= 8.1 (Best to use 8.1 since php-cs-fixer is not working on PHP 8.2 at the moment) Postgres 15 Nginx Installation steps If using laradock,

Clone the repository Install the requirements by running composer install. If you don't have composer installed, you can download it from here If you are running on a local machine, run composer install --dev to install the dev dependencies as well Get https://github.com/laradock/laradock for a clean development environment. Recommended to read this guide and follow: https://laradock.io/getting-started/#b-setup-for-multiple-projects Under laradock, Run cp .env.example .env to create the environment file. And, update the line PHP_VERSION to PHP_VERSION=8.1 In folder laradock/nginx/sites, add the file erp.conf #server {

listen 80;

server_name laravel.com.co;

return 301 https://laravel.com.co$request_uri;

#}

server {

listen 80;
listen [::]:80;

# For https
# listen 443 ssl;
# listen [::]:443 ssl ipv6only=on;
# ssl_certificate /etc/nginx/ssl/default.crt;
# ssl_certificate_key /etc/nginx/ssl/default.key;

server_name erp.test;
root /var/www/erp_template/public;
index index.php index.html index.htm;

location / {
     try_files $uri $uri/ /index.php$is_args$args;
}

location ~ \.php$ {
    try_files $uri /index.php =404;
    fastcgi_pass php-upstream;
    fastcgi_index index.php;
    fastcgi_buffers 16 16k;
    fastcgi_buffer_size 32k;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    #fixes timeouts
    fastcgi_read_timeout 600;
    include fastcgi_params;
}

location ~ /\.ht {
    deny all;
}

location /.well-known/acme-challenge/ {
    root /var/www/letsencrypt/;
    log_not_found off;
}

error_log /var/log/nginx/laravel_error.log;
access_log /var/log/nginx/laravel_access.log;

} Run docker-compose up -d nginx postgres workspace to create the docker environment Update your local machine hosts file for 127.0.0.1 erp.tet Run cp .env.example .env to create the .env file Update the .env file with the correct database credentials and Pusher credentials. If you need pusher credentials, get a free account on https://pusher.com/ Run php artisan key:generate to generate the application key Run php artisan migrate to run the database migrations Run php artisan db:seed to seed the database with the default data Run php artisan storage:link to create a symlink to your storage folder and access assets

0 likes
0 replies

Please or to participate in this conversation.