[SOLVED] How to access Mageia VirtualBox guest web server?

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

[SOLVED] How to access Mageia VirtualBox guest web server?

Postby riclags » Sep 7th, '12, 11:29

I installed Mageia 2 as VirtualBox guest on my Win 7 host. I am planning to use it mainly as a development web server. I set the Network to Bridged Adapter so that I can communicate with the web server.

Doing an ifconfig shows me the IP address of eth0 and I use that IP, go to my web browser on host machine and enter it as the address, expecting to see the "It works!" page. But instead the browser times out and shows no page. :(

Prior to using Mageia, I had a Debian guest for the same purpose. After I setup my web server in Debian, I went to my web browser in host and entered the IP address and I got the "It works!" page. I didn't have to configure stuff or anything, it just worked.

So I am thinking, maybe Mageia has some restrictions with regard to this and some other configurations are needed. Can anyone help me configure my Mageia so I can communicate with it and use it as my local development web server?
Last edited by riclags on Sep 7th, '12, 13:54, edited 1 time in total.
riclags
 
Posts: 17
Joined: Aug 13th, '12, 02:49

Re: How to access Mageia VirtualBox guest web server?

Postby ah7013 » Sep 7th, '12, 12:36

The firewall may be preventing incoming connections on the web port so you just need to run drakfirewall as root and make sure the "Web Server" box is ticked to allow incoming connections on that port.
Mageia 2 x86_64, KDE 4.8.5 on a Thinkpad Edge E520 - Intel Core i7-2640M 2.8GHZ, 16GB DDR3 RAM 1333MHz
Mageia 2 x86_64, KDE 4.8.5 on a Dell Studio 1555 - Intel Core 2 Duo T6600 2.2GHz, 8GB DDR2 RAM 800MHz
User avatar
ah7013
 
Posts: 74
Joined: Apr 9th, '11, 05:02
Location: Adelaide, Australia

Re: How to access Mageia VirtualBox guest web server?

Postby riclags » Sep 7th, '12, 13:02

ah7013 wrote:The firewall may be preventing incoming connections on the web port so you just need to run drakfirewall as root and make sure the "Web Server" box is ticked to allow incoming connections on that port.

I don't have drakfirewall installed. My Mageia installation is very minimal. During installation I only selected to install a minimal setup. Is there a way of setting up these ports manually?
riclags
 
Posts: 17
Joined: Aug 13th, '12, 02:49

Re: How to access Mageia VirtualBox guest web server?

Postby ah7013 » Sep 7th, '12, 13:36

Yes you can modify /etc/shorewall/rules manually and append something like this to it:
Code: Select all
ACCEPT  net     fw      tcp     80,443  -

After doing this just restart shorewall:
Code: Select all
systemctl restart shorewall.service
Mageia 2 x86_64, KDE 4.8.5 on a Thinkpad Edge E520 - Intel Core i7-2640M 2.8GHZ, 16GB DDR3 RAM 1333MHz
Mageia 2 x86_64, KDE 4.8.5 on a Dell Studio 1555 - Intel Core 2 Duo T6600 2.2GHz, 8GB DDR2 RAM 800MHz
User avatar
ah7013
 
Posts: 74
Joined: Apr 9th, '11, 05:02
Location: Adelaide, Australia

Re: How to access Mageia VirtualBox guest web server?

Postby riclags » Sep 7th, '12, 13:49

ah7013 wrote:Yes you can modify /etc/shorewall/rules manually and append something like this to it:
Code: Select all
ACCEPT  net     fw      tcp     80,443  -

After doing this just restart shorewall:
Code: Select all
systemctl restart shorewall.service

THANKS SO MUCH! This worked! But instead of editing the /etc/shorewall/rules file, I appended the line you provided to the /etc/shorewall/rules.drakx file. I'm guessing the latter file is what drakfirewall changes?

Again, thanks so much! :D
riclags
 
Posts: 17
Joined: Aug 13th, '12, 02:49

Re: How to access Mageia VirtualBox guest web server?

Postby ah7013 » Sep 7th, '12, 13:58

Yes that's correct, drakfirewall modifies /etc/shorewall/rules.drakx.
Mageia 2 x86_64, KDE 4.8.5 on a Thinkpad Edge E520 - Intel Core i7-2640M 2.8GHZ, 16GB DDR3 RAM 1333MHz
Mageia 2 x86_64, KDE 4.8.5 on a Dell Studio 1555 - Intel Core 2 Duo T6600 2.2GHz, 8GB DDR2 RAM 800MHz
User avatar
ah7013
 
Posts: 74
Joined: Apr 9th, '11, 05:02
Location: Adelaide, Australia


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest