How to configure vhost on apache

0

i have a question about the vhost-configuration of apache.

I have a server, which runs an application on the "old" way with no mod rewrite or something like this.

example:

Folder                    -> Domain
htdocs/mainapp/index.php -> www.mainapp.de/

now i've written a laravel-application, which uses mod_rewrite: in my testsetting i've routed it to it's own domain f.e. myapp/ Now i've finished the work on my laravel-project and want to publish the application on the server. But the Webserveradmin, will not configure an own domain for the application, his wish is to use my application under following url: mainapp.de/myapp/

now the problem, i require mod_rewrite for my laravel project since i use the internal uri engine. so my url in my testsetting was

myapp/{uri}

now my question, is it possible to make something like a subdomain on the url:

www.mainapp.de/myapp/{uri}

the only alternative solution i know would be setting up a subdomain for my application, but the admin doesn't prefer this.

myapp.mainapp.de (not wanted)

thanks for your suggestions/help, greetings :)

Krie9er

Posted 2016-05-02T06:50:33.347

Reputation: 1

Answers

0

virtual hosts map domains, sub-domains, and IP addresses to a section of configuration. that's not going to help you here. I feel like you are confusing the word domain and subdomain, which refers to any one of the following forms

.com Google.com www.google.com a1.www.google.com

what you are looking for is hosting your application as a path under the domain mainapp.de .

your application should work out of the box as long as your didn't hardwire any domain in the source code and the paths are all relative.

e.g. you click a link in the app that directs you to page1 . if the application is in the root folder of mainapp.de, then mainapp.de/page1 will work. if the app is in the folder myapp under the root folder, then mainapp.de/myapp/page1 will work.

Iyad K

Posted 2016-05-02T06:50:33.347

Reputation: 105