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

iftekhs's avatar
Level 13

Laravel forge cannot display default site through Ip

Hi, I have added a repository of my own and added the domain named "default" to view it using the ip address of the server. But now all of a sudden it shows this error on the browser

[SERVER_IP] didn’t send any data.

I have ssh into my server and there is only a folder named "public" with a index.html file in it and that is ok all the files are ok and the root for that domain in forge is shown "/home/forge/default/public" still the ip cannot show the index.html :/

any idea why this is happening ?

0 likes
3 replies
LaryAI's avatar
Level 58

It sounds like you're having trouble with your Laravel Forge server configuration. Here are a few steps you can take to troubleshoot the issue:

  1. Check the Nginx Configuration: Ensure that the Nginx configuration for your site is set up correctly. The configuration file should be located in /etc/nginx/sites-available/ and should be symlinked to /etc/nginx/sites-enabled/. The configuration should point to the correct root directory and listen to the correct IP address and port.

    server {
        listen 80;
        server_name [SERVER_IP];
    
        root /home/forge/default/public;
        index index.html index.htm index.php;
    
        location / {
            try_files $uri $uri/ /index.php?$query_string;
        }
    
        # Other configurations...
    }
    
  2. Check the Nginx and PHP-FPM Services: Make sure that both Nginx and PHP-FPM services are running. You can check their status and restart them if necessary.

    sudo service nginx status
    sudo service nginx restart
    sudo service php7.4-fpm status # Replace with your PHP version
    sudo service php7.4-fpm restart
    
  3. Check Server Block & Default Site: If you have a default server block in Nginx, it might be catching requests to your IP address before they reach your site's server block. You might need to adjust the default server block to either remove it or ensure it's not conflicting with your site's configuration.

  4. Check Firewall Settings: Verify that your server's firewall is not blocking HTTP traffic. You can use ufw to manage the firewall settings.

    sudo ufw status
    sudo ufw allow 'Nginx Full'
    
  5. Check Logs for Errors: Look at the Nginx error logs to see if there are any messages that can help you identify the problem.

    sudo tail -f /var/log/nginx/error.log
    
  6. Permissions and Ownership: Ensure that the permissions and ownership of the files in your web directory are correct. Nginx usually runs as the www-data user.

    sudo chown -R forge:www-data /home/forge/default
    sudo find /home/forge/default -type f -exec chmod 644 {} \;
    sudo find /home/forge/default -type d -exec chmod 755 {} \;
    
  7. DNS Settings: If you're trying to access your site using an IP address but have set a server_name in your Nginx configuration, make sure that the DNS settings are not causing an issue. You might need to add an A record pointing to your server's IP address if you want to use a domain name.

If after following these steps you're still experiencing issues, you may want to consider reaching out to Laravel Forge support for more specific assistance, as they will have access to server details and can provide more targeted help.

ryangurnick's avatar

@iftekhs So it sounds like you provisioned a new server within Forge and then the default site is not showing properly when going to the site via the browser?

When you setup the server did you create an "App Server"? or some other type? It might be that not all of the services are installed so it is missing some things. Otherwise I would expect something to exist within /home/forge/default/public

1 like
iftekhs's avatar
iftekhs
OP
Best Answer
Level 13

@ryangurnick Hi! Thanks for your response I actually deleted the server I guess and re installed all things and now everything is ok :)

Please or to participate in this conversation.