Changing IP of Apache-Server

New to Debian (Or Linux in general)? Ask your questions here!

Changing IP of Apache-Server

Postby Patrigo » 2017-11-04 06:27

Dear All

I installed OwnCloud on Apache2 with SSL. It works great but as soon as I change the ip adress to another one it doesn't work anymore. Unfortunately I'm not able to find the error and I didn't make any fix bindings to the ip. I also searched trough all config files with grep -ir 192.168.1.27 /etc/ to see if there is somwhere the old ip.

What could be the problem?

How I changed the ip:
I editet /etc/network/interfaces and restarted the server

Browser Error with new IP:
Code: Select all
Forbidden
You don't have permission to access / on this server.

Apache/2.4.25 (Debian) Server at 192.168.1.131 Port 443


/etc/apache2/sites-available/owncloud.conf
Code: Select all
<VirtualHost *:80>
  RewriteEngine on
  ReWriteCond %{SERVER_PORT} !^443$
  RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>
 
<VirtualHost *:443>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/owncloud.crt
SSLCertificateKeyFile /etc/apache2/ssl/owncloud.key
DocumentRoot /var/www/html/
 
  <Directory /var/www/html/>
    AllowOverride All
    order allow,deny
    Allow from all
  </Directory>
</VirtualHost>


How I can see in the error log it points to the wrong directory:
[Sat Nov 04 08:05:31.637018 2017] [autoindex:error] [pid 780] [client 192.168.1.149:63979] AH01276: Cannot serve directory /usr/share/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive


All other config files also point to /var/www/html/. When i change the ip back it works great again.

Thanks
Patrick
Patrigo
 
Posts: 3
Joined: 2017-11-04 06:09

Re: Changing IP of Apache-Server

Postby andre@home » 2017-11-04 06:35

If it is an Owncloud issue, you will be better off here: https://forum.owncloud.org/viewforum.php?f=6
Report back when it is solved or keep us informed or put the link of your posting on the forum here, so we can follow you.
andre@home
 
Posts: 275
Joined: 2011-10-02 08:00

Re: Changing IP of Apache-Server

Postby debiman » 2017-11-04 07:16

thanks for a detailed & on the dot first post!
except for this:
Patrigo wrote:It works great but as soon as I change the ip adress to another one it doesn't work anymore.

how exactly do you do that?

PS: is owncloud one of these "web apps" that try to spare you the "burden" of editing text files?
User avatar
debiman
 
Posts: 1539
Joined: 2013-03-12 07:18

Re: Changing IP of Apache-Server

Postby Patrigo » 2017-11-04 16:43

Thanks but it is not about OwnCloud so therefore I didn't post it there. Even when I go to the root apache Webpage it won't appear anymore and say it is a permission issue.

How I wrote it above, I just edited the interface config file and restarted the server.
Patrigo
 
Posts: 3
Joined: 2017-11-04 06:09

Re: Changing IP of Apache-Server

Postby andre@home » 2017-11-04 18:38

Maybe more people have a similar problem on owncloud. Certainly when it concerns permissions you expect owncloud forum people to know better as they are more focused on it than, I'm sorry... ;) the average (what is that ;) ... ;) Debian user.
For setting up webdav as share tool, I had more contributions from those webdav people than on Debian sites.
andre@home
 
Posts: 275
Joined: 2011-10-02 08:00

Re: Changing IP of Apache-Server

Postby Patrigo » 2017-11-05 04:34

Yes you are right;-) Well at the end I reinstalled the whole server and now it works. Not sure were I mad the mistake. Thank you very much for your help.
Patrigo
 
Posts: 3
Joined: 2017-11-04 06:09


Return to Beginners Questions

Who is online

Users browsing this forum: rolf819 and 11 guests

fashionable