Support the ongoing development of Laravel.io →
posted 6 years ago

Dear,

I have a debian server 9 with apache2 and laravel 5.6

I have the folder: /LcmTI/projects/www to publish my projects, port 81 answers for all projects, eg: http: // localhost: 81/project1 [html project only]

In the folder /LcmTI/projects/laravel, I have two laravel projects 5.6:

  • extranet [/LcmTI/projects/laravel/extranet]
  • intranet [/LcmTI/projects/laravel/intranet]

I have created a link to the two projects in the www folder (which is the folder that is published):

  • ln -s /LcmTI/projects/laravel/extranet/public /LcmTI/projects/www/extranet
  • ln -s /LcmTI/projects/laravel/intranet/public /LcmTI/projects/www/intranet

In this way, I expected without any problem to access the two laravel environments without any problem, but it is not working.

When I type: http://localhost:81/extranet/api/test or http://localhost:81/intranet/api/test does not work and should return:

/* file routes/api.php in both applications */ Route::get('test', function () { return response()-> json(['foo' => 'bar']); });

If I enter http://localhost:81/extranet or http://localhost:81/intranet Enter the homepage of Laravel

my config apache2: <VirtualHost *:81>

DocumentRoot /LcmTI/projects/www

<Directory /LcmTI/projects/www/>
	Options Indexes FollowSymLinks MultiViews
	AllowOverride None
	Order allow,deny
	allow from all
	Require all granted
</Directory>
</VirtualHost>

I'm having a hard time setting up larval API applications on a single host.

Could you help me.

Thank you.

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.