Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Changing IP of Apache-Server

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
Patrigo
Posts: 7
Joined: 2017-11-04 06:09

Changing IP of Apache-Server

#1 Post by Patrigo »

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

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Changing IP of Apache-Server

#2 Post by andre@home »

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.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Changing IP of Apache-Server

#3 Post by debiman »

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?

Patrigo
Posts: 7
Joined: 2017-11-04 06:09

Re: Changing IP of Apache-Server

#4 Post by Patrigo »

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.

andre@home
Posts: 398
Joined: 2011-10-02 08:00

Re: Changing IP of Apache-Server

#5 Post by andre@home »

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.

Patrigo
Posts: 7
Joined: 2017-11-04 06:09

Re: Changing IP of Apache-Server

#6 Post by Patrigo »

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.

Post Reply