Page 1 of 1

Can not Get to Apache Virtual Hosts on Fedora

Posted: 20. Nov 2013, 22:34
by Trysis
I am trying to set up virtual hosts on Fedora. I am reasonably competent in this area, having set up virtual hosts for my Windows 8 host & my Ubuntu VM. However, something in Fedora is stumping me. I think it is SELinux, because it is a permission error, specifically HTTP error 403 (I can see this with Firebug), meaning (I hope) it can get to the virtual hosts' folders or at least knows where they are but does not have permission to access them. I chowned all folders up the hierarchy from root & chmodded them to 777 (when I figure out the problem, first thing I'm doing is setting those back) but I still get the 403 error. How can I find out if the problem is SELinux, and how do I fix it either way?

My /etc/hosts file:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

127.0.1.1 angularphone.cat
::1 angularphone.cat

/etc/httpd/conf/httpd.conf file posted as attachment as it is too long.

VB info:
version 4.3.2
Guest Additions installed


Host:
Windows 8 64-bit
500GB
6GB RAM

Guest:
Fedora v19 64-bit
40GB
2GB RAM assigned

Ask me if you need any more info.

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 20. Nov 2013, 23:48
by Perryg
First it sounds like you are mixing up the words host and guest. The guest is installed within the VirtualBox program that is installed on the host.

Looking at the posting however you do not have a network defined, or it is not working. 127.0.0.1 is a local loopback and that will not go anywhere.
Finally if you suspect SELinux just disable it.

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 00:22
by Trysis
1. What gave you the idea I was mixing up hosts & guests? I know what the difference is & frankly you saying this in your answer is rather insulting.

2. I am not putting this on the public Internet, although I may do that later. This is why I only have local loopback installed.

I have seen how to disable SELinux, but I would still like to know how to do what I need with it on. I may try disabling it temporarily, however.

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 00:32
by Perryg
having set up virtual hosts for my Windows 8 host
1) I don't make this stuff up. I only know what I read. Anyway it was just to suggest to you that it can confuse people.

2) Didn't say anything about public Internet either. With no network the only place you will see the server is on the guest machine it is installed on. The host will not see it at all. It can't.

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 00:46
by Trysis
My Windows 8 computer is the host. I do not know what you do not understand here.

I do not want any other computer to see my virtual hosts, at least right now. I don't care if my host machine sees it or not, either, which is why I just have it on loopback so only my GUEST can see it. I never said I wanted my host computer to access it.

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 01:09
by Perryg
I do not want any other computer to see my virtual hosts, at least right now. I don't care if my host machine sees it or not, either, which is why I just have it on loopback so only my GUEST can see it
That's what I was talking about. The virtual are guests. Look I am just trying to help and give some advise. Use it or don't it's fine either way.

Then you have a problem with the configuration of the guest OS itself. If you have the apache server running on the guest and the guest can not see it look at the allowed services

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 01:14
by Trysis
This is what I am trying to say. All issues are on the guest, nowhere else on the computer or Internet.

As I was trying to say, it seems like Apache can get to the www folder, as it is a permissions error and not a 404 or 5xx error.

So I assume you do not know about SELinux & therefore can not help me? If so, that's OK, thanks anyway.

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 01:21
by Perryg
I know SELinux and I know Fedora and I also know Apache.

Your issue however has nothing to do with VirtualBox. Since all events are within the guest it is an issue with configuration of the guest itself (which is outside the scope of this forum) or the http server.

I suggested that you look at the allowed services and make sure that http/https are allowed. I assume you know that this is located in the guest OS and usually under the firewall section.

SELinux is as simple as editing /etc/selinux/config (it even tells you how).

Any further Fedora OS specific questions should be refereed to Fedora

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 01:24
by Trysis
Sorry, you're right. My bad, I should not have posted to this forum. Thank you for your help.

Re: Can not Get to Apache Virtual Hosts on Fedora

Posted: 21. Nov 2013, 01:32
by Perryg
No problem. If you find an issue with VirtualBox or when you decide to setup the network portion of VirtualBox let us know.

Note: SELinux is more than likely not your issue I strongly suggest that you look are the firewall section and make sure that the service is allowed. By default ( in Fedore ) it is not.