Yii Framework Forum: How To Set Sites In Apache For Advanced App - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How To Set Sites In Apache For Advanced App

#1 User is offline   klaus66 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 32
  • Joined: 15-October 11
  • Location:Germany

Posted 01 February 2014 - 05:39 AM

I want to setup an advanced app.

Say I have one domain e.g. www.example.com

I use virtuell hosts on my apache 2.4

I want that users can see my frontend by www.example.com and my backend by www.example.com/backend

Must I setup two different sites-avaiable with different document roots.

To simulate a domain

I create a new host in my windows host file (domain): 127.0.0.1 fewo_yii2_advanced
I create a new host in my windows host file (subdomain): 127.0.0.1 backend.fewo_yii2_advanced

then I create my vhosts under apache conf

<VirtualHost 127.0.0.1:80>
	ServerName fewo_yii2_advanced
	ServerAlias 127.0.0.1
	DocumentRoot c:/www/fewo_yii2_advanced/frontend/web
</VirtualHost>

<VirtualHost 127.0.0.1:80>
	ServerName backend.fewo_yii2_advanced
	ServerAlias 127.0.0.1
	DocumentRoot c:/www/fewo_yii2_advanced/backend/web
</VirtualHost>


This worked well as expected for my front- and backend, but I don't know what to do when I want to reach my backend without a subdomain under fewo_yii_advanced/backend.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users