stanperdue
Posts: 6
Joined: Fri Dec 28, 2018 5:36 pm
Location: United States

Setup web-server, installed Owncloud, cannot see web-server

Fri Dec 28, 2018 5:53 pm

I set up a web-server (Apache2) in Raspbian Stretch, on a Raspberry Pi 3 B+. It worked fine in my browser by typing in the IP address (192.168.1.201) or hostname (pi201) & took me to my index.html in /var/www/html. Then I installed Owncloud in /var/www/owncloud. Now when I type in the same IP or hostname in the browser, it goes straight to Owncloud (which works fine), not my index.html in /var/www/html. I can’t even see my web-pages anymore. How can I see my web-pages again? Please help & thanks!

pcmanbob
Posts: 6671
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Setup web-server, installed Owncloud, cannot see web-server

Fri Dec 28, 2018 7:45 pm

Hi

That's because I think you will find that owncloud is web server based, so when you installed it you installed another web server and owncloud set this up to be the working web server on your pi.

So owncloud has replace your previously installed web-server (Apache2) so now when you connect to your pi's IP on the default port 80 it's the owncloud web server that responds.

As both web servers are set to listen on port 80 by default the last one installed will be the one to respond, if you want to run 2 web servers on you pi you will need to change one of them to listen on a different port and then when connecting to the pi's IP you will need to specify which port you want to connect to.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

stanperdue
Posts: 6
Joined: Fri Dec 28, 2018 5:36 pm
Location: United States

Re: Setup web-server, installed Owncloud, cannot see web-server

Fri Dec 28, 2018 8:03 pm

So, how do I fix this?
pcmanbob wrote:
Fri Dec 28, 2018 7:45 pm
Hi

That's because I think you will find that owncloud is web server based, so when you installed it you installed another web server and owncloud set this up to be the working web server on your pi.

So owncloud has replace your previously installed web-server (Apache2) so now when you connect to your pi's IP on the default port 80 it's the owncloud web server that responds.

As both web servers are set to listen on port 80 by default the last one installed will be the one to respond, if you want to run 2 web servers on you pi you will need to change one of them to listen on a different port and then when connecting to the pi's IP you will need to specify which port you want to connect to.

fbe
Posts: 494
Joined: Thu Aug 17, 2017 9:08 pm

Re: Setup web-server, installed Owncloud, cannot see web-server

Fri Dec 28, 2018 9:37 pm

There is most likely only the apache2 webserver installed, but the the owncloud installation changed the configuration. Nobody can help you unless you explain, how you installed owncloud. Maybe you followed a tutorial...

You should look into the files below /etc/apache2. If the owncloud setup followed the convention for apache2 configuration in debian, it should have created a site configuration file in /etc/apache2/sites-available and enabled it by creating a symbolic link in /etc/apache2/sites-available or the /etc/apache2/sites-available/000-default.conf file was modified. Look into these files for DocumentRoot configuration.

stanperdue
Posts: 6
Joined: Fri Dec 28, 2018 5:36 pm
Location: United States

Re: Setup web-server, installed Owncloud, cannot see web-server

Fri Dec 28, 2018 10:04 pm

I did use a tutorial at: https://pimylifeup.com/raspberry-pi-owncloud/
All these (and others I have looked thru) configuration files point to /var/www/html - the word 'owncloud' doesn't exist in any of them.
fbe wrote:
Fri Dec 28, 2018 9:37 pm
There is most likely only the apache2 webserver installed, but the the owncloud installation changed the configuration. Nobody can help you unless you explain, how you installed owncloud. Maybe you followed a tutorial...

You should look into the files below /etc/apache2. If the owncloud setup followed the convention for apache2 configuration in debian, it should have created a site configuration file in /etc/apache2/sites-available and enabled it by creating a symbolic link in /etc/apache2/sites-available or the /etc/apache2/sites-available/000-default.conf file was modified. Look into these files for DocumentRoot configuration.

stanperdue
Posts: 6
Joined: Fri Dec 28, 2018 5:36 pm
Location: United States

Re: Setup web-server, installed Owncloud, cannot see web-server

Fri Dec 28, 2018 10:19 pm

The file /etc/nginx/sites-available/default points to /var/www/owncloud. But if I change it to /var/www/html, I get '404 Not Found' in the browser.

pcmanbob
Posts: 6671
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Setup web-server, installed Owncloud, cannot see web-server

Fri Dec 28, 2018 10:29 pm

As I said before owncloud installs its own web server nginx is a web server software so I guess that's what they are using.

So now you have your apache2 web server which you installed and nginx which owncloud installed, as the nginx was the last installed I guess port 80 was set to point to that server.

So you could try pointing the apache2 web server to a different port as I suggested before, there are examples of how to do this on the web.

You will of course have to reverse any changes you said you made in your last post.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

stanperdue
Posts: 6
Joined: Fri Dec 28, 2018 5:36 pm
Location: United States

Re: Setup web-server, installed Owncloud, cannot see web-server

Sat Dec 29, 2018 3:44 am

I fixed it. I completely uninstalled everything & started over with only Apache. It is working fine now.

Return to “General discussion”