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

ashif_mujtoba's avatar

Laravel deploy into aws ec2 api route problem

My aws ec2 public ip is http://34.208.73.12/. Its working fine after document root change and configured. Using Ubuntu 16.04 as OS.

My '/etc/apache2/sites-available/000-default.conf' file is

<VirtualHost *:80>
   ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/laravel/public

    <Directory /var/www/html/laravel/>
            Options FollowSymLinks
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Configured '/etc/apache2/apache2.conf' file as

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Require all denied
</Directory>

<Directory /usr/share>
    AllowOverride None
    Require all granted
</Directory>

my public ip http://34.208.73.12/ working fine but http://34.208.73.12/test is not working. Any other api route is also not working. Always giving error-

Not Found

The requested URL /test was not found on this server.

Apache/2.4.18 (Ubuntu) Server at 34.208.73.12 Port 80

What I have done wrong? Please suggest to solve this.

0 likes
0 replies

Please or to participate in this conversation.