Deploy slim api on ovh server

Hi,
i’m a beginner in slim api, but i build working rest api on my local machine. Now i want to deploy it on my ovh server. How could i do this?

On the server i want to have following structure for my api:

  • www (web folder for my website)
    • myapi - folder where i want to store any files from my slim api rest project

I stored index.php and .htaccess files in public_html folder. There is a .htaccess content:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [QSA,L]
</IfModule>

Thanks for any reply :wink:

Hi @rafbos

  • Ensure your DocumentRoot points to your public_html directory.
  • Also try to comment out RewriteBase /