Pynas
(Ngbwahugues)
April 10, 2017, 11:51am
1
Hello everyone! I am in development of a small application with YII2, when the online to test instead of directly running index.php which is in the web folder (because I use the Basic version), the server instead launches the Root of the project and all files are visible. Please how to directly launch the homepage?
patrickm
(Yiiframework)
April 10, 2017, 11:58am
2
Set your "web" folder as document root.
tri
(tri - Tommy Riboe)
April 10, 2017, 1:01pm
5
tri
(tri - Tommy Riboe)
April 10, 2017, 1:41pm
6
Obviously, to the best of my knowledge, you will need a different domain or subdomain or named virtual host or ipnr or port for this second webroot.
Pynas
(Ngbwahugues)
April 11, 2017, 6:24am
7
thank y <br>but my server is apache however, i don’t know how config the file php.ini et http.cong <br>
tri
(tri - Tommy Riboe)
April 11, 2017, 8:27am
8
Sorry I didn’t read your first post thoroughly. Assumed you use advanced template since you had to even ask about this. But you are using basic template so only one webroot.
You don’t mention shared hosting so you probably have all freedom to edit the apache config at /etc/apache2. (Read the Apache documentation.)
If you don’t want to change webroot there’s at least one user contributed version around, Yii 1.x-style security.
xPeng
(Xunpeng)
April 11, 2017, 7:20pm
9
pynas:
Hello everyone! I am in development of a small application with YII2, when the online to test instead of directly running index.php which is in the web folder (because I use the Basic version), the server instead launches the Root of the project and all files are visible. Please how to directly launch the homepage?
your domain is now pointed to the
../../basic
so change it to point your domain to your web root:
../../basic/web
and run
../../basic/php init
make it works.
Pynas
(Ngbwahugues)
April 13, 2017, 5:48am
10
tri:
Sorry I didn’t read your first post thoroughly. Assumed you use advanced template since you had to even ask about this. But you are using basic template so only one webroot.
You don’t mention shared hosting so you probably have all freedom to edit the apache config at /etc/apache2. (Read the Apache documentation.)
If you don’t want to change webroot there’s at least one user contributed version around, Yii 1.x-style security.
i understand you but your last tense i don’t undertand it
Pynas
(Ngbwahugues)
April 13, 2017, 5:52am
11
sorry my friend, if i have a stupide quetions i’m new in the deploment and production with YII2.
wy do you wont me to do it? i don’t have ideas plaese
tri
(tri - Tommy Riboe)
April 13, 2017, 8:04am
12
“If you don’t want to change webroot there’s at least one user contributed version around, Yii 1.x-style security.”
With this I mean the start script index.php at top level and user non-accessible files under subdir _protected.
xPeng
(Xunpeng)
April 18, 2017, 9:07pm
13
pynas:
sorry my friend, if i have a stupide quetions i’m new in the deploment and production with YII2.
wy do you wont me to do it? i don’t have ideas plaese
If you would give me your hosting account access, I could fix it for you. It just about 10 min.