View previous topic :: View next topic |
Author |
Message |
spylinux n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Nov 2015 Posts: 2 Location: Brasil
|
Posted: Tue Mar 15, 2016 5:43 pm Post subject: [SOLVED] Problem with virtual hosts in Apache |
|
|
Hi everyione,
I made a clean install of Apache and PHP, and works fine.
In /etc/portage/make.conf i have set:
APACHE2_MPMS="prefork"
And in etc/portage/packages.use i set:
www-servers/apache mpm-prefork
app-admin/apache-tools
But i want to use virtualhosts, to access my sites like http://mysite.com not http://localhost/mysite
I have create a file in: /etc/apache2/vhosts.d/cakephp.io.conf with this content:
Code: | <VirtualHost *:80>
ServerAdmin spylinux@openmailbox.org
DocumentRoot /var/www/localhost/htdocs/cakephp
ServerName cakephp.io
ServerAlias www.cakephp.io
LogLevel warn
ErrorLog /var/www/localhost/htdocs/cakephp/logs/error.log
CustomLog /var/www/localhost/htdocs/cakephp/logs/access.log combined
<Directory /var/www/localhost/htdocs/cakephp.io>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.html index.php
</Directory>
</VirtualHost> |
And add this line in /etc/hosts
After restart Apache, when i try to access http://cakephp.io, i have 403 Error - Forbidden. And the Apache log have this:
Code: | [Tue Mar 15 12:41:04.011560 2016] [mpm_prefork:notice] [pid 4061] AH00163: Apache/2.4.18 (Unix) OpenSSL/1.0.2g PHP/5.6.18-pl0-gentoo configured -- resuming normal operations
[Tue Mar 15 12:41:04.011620 2016] [core:notice] [pid 4061] AH00094: Command line: '/usr/sbin/apache2 -D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP5 -d /usr/lib64/apache2 -f /etc/apache2/httpd.conf' |
Anyone can tell me what i'm doing wrong, or how can i solve this problem about create Virtual Hosts on Gentoo?
Thanks for any help!
spylinux _________________ In Tux We Trust
Last edited by spylinux on Tue Mar 15, 2016 6:08 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
kazdva n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 14 Mar 2016 Posts: 26
|
Posted: Tue Mar 15, 2016 6:00 pm Post subject: Re: Problem with virtual hosts in Apache |
|
|
Code: | <Directory /var/www/localhost/htdocs/cakephp.io> |
I think you had in mind /var/www/localhost/htdocs/cakephp |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
spylinux n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 01 Nov 2015 Posts: 2 Location: Brasil
|
Posted: Tue Mar 15, 2016 6:07 pm Post subject: Re: Problem with virtual hosts in Apache |
|
|
AdamScheller wrote: | Code: | <Directory /var/www/localhost/htdocs/cakephp.io> |
I think you had in mind /var/www/localhost/htdocs/cakephp |
Thank you so much @AdamScheller,
I not see before my mistake in Path of directory. Now, works fine!
Again, thanks!
Best regards
spylinux _________________ In Tux We Trust |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|