Jump to content

First time setting up apache server

IreMinMon

I'm having a really simple problem someone with experience would solve in no time. However, I'm having no experience at all.

What I'm basically doing is setting up a server, running in virtual machine locally on my computer (Debian), then trying to access it via local network. I had it all up and running yesterday on IP 192.168.1.12, then my brother would reboot my computer because he wanted to "go on Windows" and he wouldn't save anything. Server now doesn't work. I rebooted the VM and tried setting back to how it was before. As we speak - running "ifconfig" would give me the IP 192.168.1.100 and when I copy it into my browser I get the 404 error. "systemctl status apache2" would return the apache to be active (running). What am I missing here? I'm not sure how it all works, cna someone help me out?

post-183806-0-27380000-1453558110_thumb.

Link to comment
Share on other sites

Link to post
Share on other sites

Do you have an index.html or index.php file in your www server directory?

Link to comment
Share on other sites

Link to post
Share on other sites

Do you have an index.html or index.php file in your www server directory?

Yes, I manually edited my index.html file yesterday and it's still there. Named index.html. It worked already, don't know why I can't get it to work today...

Link to comment
Share on other sites

Link to post
Share on other sites

can you access the adress using your vm where the servers running on?

 

try to ping said ip using(on your local pc)

ping 192.168.1.100

also what ip does your apache listen to? look for a listen directive in your config or use (on your vm)

 sudo netstat -nlp | grep apache

IF YOU WANT ME TO REPLY TO YOU, QUOTE MY POST.

Fire Strike Score

5820K @ 4.8GHZ - 1.25v / Uncore @ 4.5GHZ - 1.2v / 3000MHZ G.skill 32GB Quad Channel / Asus Rampage V Extreme / 950 Pro Nvme / Sound Blaster ZxR  / 980 TI / Windows 7

 

Link to comment
Share on other sites

Link to post
Share on other sites

 

can you access the adress using your vm where the servers running on?

 

try to ping said ip using(on your local pc)

ping 192.168.1.100

also what ip does your apache listen to? look for a listen directive in your config or use (on your vm)

 sudo netstat -nlp | grep apache

Yeah, really turns out my VM doesn't have internet access or so. Which is weird, it worked yesterday. trying to set it up agian, any ideas?

Link to comment
Share on other sites

Link to post
Share on other sites

ive never used oracle but there has to be something to give access to ethernet right? like giving rights to use it, i dont know. 

IF YOU WANT ME TO REPLY TO YOU, QUOTE MY POST.

Fire Strike Score

5820K @ 4.8GHZ - 1.25v / Uncore @ 4.5GHZ - 1.2v / 3000MHZ G.skill 32GB Quad Channel / Asus Rampage V Extreme / 950 Pro Nvme / Sound Blaster ZxR  / 980 TI / Windows 7

 

Link to comment
Share on other sites

Link to post
Share on other sites

Use the VM to open its own webpage to isolate networking issue between host and guest OS.

 

On the VM, navigate to the web root directory and check the files and their permissions.

Link to comment
Share on other sites

Link to post
Share on other sites

ive never used oracle but there has to be something to give access to ethernet right? like giving rights to use it, i dont know. 

The VM is set to bridged adapter, I'm pretty sure the VM settings are okay. I must be the system running inside the VM that's causing trouble. I really wouldn't want to reinstall.

Link to comment
Share on other sites

Link to post
Share on other sites

The VM is set to bridged adapter, I'm pretty sure the VM settings are okay. I must be the system running inside the VM that's causing trouble. I really wouldn't want to reinstall.

 

 

well you said your vm has no internet access, can you open sites like google? then it shouldnt be a permission issue.

IF YOU WANT ME TO REPLY TO YOU, QUOTE MY POST.

Fire Strike Score

5820K @ 4.8GHZ - 1.25v / Uncore @ 4.5GHZ - 1.2v / 3000MHZ G.skill 32GB Quad Channel / Asus Rampage V Extreme / 950 Pro Nvme / Sound Blaster ZxR  / 980 TI / Windows 7

 

Link to comment
Share on other sites

Link to post
Share on other sites

Use the VM to open its own webpage to isolate networking issue between host and guest OS.

 

On the VM, navigate to the web root directory and check the files and their permissions.

Honestly, I don't know what you mean. Internet works perfectly fine outside VM, inside VM it's probally system files lacking permissions, as you've said. I don't know how to check those files or which are those files. Maybe I'll just post some pictures.

Link to comment
Share on other sites

Link to post
Share on other sites

well you said your vm has no internet access, can you open sites like google? then it shouldnt be a permission issue.

Not inside the VM, no. "ping google.com" didn't work. How do I chmod those permissions?

Link to comment
Share on other sites

Link to post
Share on other sites

So this is the quickly taken screenshots of my xfce network settings. Doesn't look very encouraging does it?

post-183806-0-93290300-1453564438_thumb.

post-183806-0-41507100-1453564451_thumb.

Link to comment
Share on other sites

Link to post
Share on other sites

Not inside the VM, no. "ping google.com" didn't work. How do I chmod those permissions?

your signature says that I should quote you in order to get the reply =)

Link to comment
Share on other sites

Link to post
Share on other sites

Try browsing to localhost or 127.0.0.1 on the VM.

What happens then?

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

Try browsing to localhost or 127.0.0.1 on the VM.

What happens then?

404 error, same as 192.168.1.100, or what's in the first picture I had uploaded.

Link to comment
Share on other sites

Link to post
Share on other sites

 

Honestly, I don't know what you mean. Internet works perfectly fine outside VM, inside VM it's probally system files lacking permissions, as you've said. I don't know how to check those files or which are those files. Maybe I'll just post some pictures.

Apache usually put web root to /var/www/. Just open a terminal and navigate there. run 'ls -l' and find out who's the owner of the files, if there's any.

 

I'll worry about the guest OS (debian) unable to access Internet after verifying apache serves pages correctly.

Link to comment
Share on other sites

Link to post
Share on other sites

 

 

Apache usually put web root to /var/www/. Just open a terminal and navigate there. run 'ls -l' and find out who's the owner of the files, if there's any.

 

I'll worry about the guest OS (debian) unable to access Internet after verifying apache serves pages correctly.

 

It appears root is the owner of both the html folder and the index.html file I've put there just in any case. Inside the html folder ther's another copy of index.html file with the same owner. the permissions are "-rw-r--r-- 1 root root". Is that a problem?

Link to comment
Share on other sites

Link to post
Share on other sites

404 error, same as 192.168.1.100, or what's in the first picture I had uploaded.

Then you've got an Apache configuration error somewhere. If Apache was running correctly localhost on the host machine should always resolve to the http server.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

It appears root is the owner of both the html folder and the index.html file I've put there just in any case. Inside the html folder ther's another copy of index.html file with the same owner. the permissions are "-rw-r--r-- 1 root root". Is that a problem?

Change its owner to webadmin or what apache service is using. https://serverfault.com/questions/224560/best-permissions-ownership-for-apache-document-root

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×