So the /public part appears to be a hint. What does your .htaccess file look like? Does public appear in your .htaccess file or vhost config? I assume app/form/public doesn’t physically exist.
I guess I’m a little confused what you are trying to achieve for URLs and directory structure. Typically, inside your public or public_html directory is where your .htaccess and index.php files would reside. That directory is then your DocumentRoot in your vhost config.
The index.php file then acts as your “front controller” and all requests go through it. It would be accessed from http://localhost/. $app->get('/', would respond to that request. Likewise if you asked for http://localhost/v1/mod the route definition to match would be $app->get('/v1/mod',.
I think I understand what you’re trying to achieve. If you try to make the slim framework app accessible in a VirtualFolder of your domain (for example http://example.com/api/ ) then you should add/uncomment the RewriteBase / option.
Here are my config file and .htaccess
The vhost.conf apache configuration file
<VirtualHost *:80>
Alias "/api" "/home/slava/projects/ihh-service/public"
<Directory /home/slava/projects/ihh-service/public>
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/angular_qt.error.log
CustomLog ${APACHE_LOG_DIR}/angular_qt.access.log combined
</VirtualHost>