Author Topic: [SOLVED] Administration Port Changed to 21 By accident - CANT GET IT TO CHANGE!?  (Read 1446 times)

firegs

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
Really struggling with this, and I cannot for the life of me get it to work. I accidently changed Zentyal's Administration port to 21. Now I cannot connect to the Zentyal Web UI.

I've changed /var/lib/zentyal/conf/apache2.conf to reflect 443 instead of 21, but EVERY TIME I start up /etc/init.d/zentyal apache start - the conf files revert back to 21. I even tried to use lynx to browse to https://localhost:21 - and change the port in there, but no matter how many times I try - it does NOT CHANGE.

What, in gods name, am I doing wrong?
« Last Edit: February 06, 2013, 02:35:53 pm by firegs »

thorsten

  • Guest
Re: Administration Port Changed to 21 By accident - CANT GET IT TO CHANGE!?
« Reply #1 on: February 05, 2013, 11:07:33 pm »
I do not know, but I had exactly the same problem....

I tried reboots, restarts of apache and nothing worked .... so I decided to to to bed and slept - the next morning everything was fine again

... so be patient and do not loose hope...

(see here: http://forum.zentyal.org/index.php/topic,13855.0.html)

Good Luck
Thorsten

firegs

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
Re: Administration Port Changed to 21 By accident - CANT GET IT TO CHANGE!?
« Reply #2 on: February 06, 2013, 02:35:42 pm »
Okay, so I got it to change. After a lot of work, I realised that all of the files I was trying to change are simply generated by Zentyal when the service runs, so editing the conf files manually didn't do a thing. All of these settings are stored in a SQL database.

The easy solution: You have to allow Firefox to use port 21 (or whatever port youve set) on the Zentyal machine. In Firefox, go to "about:config". Then ADD a key called "network.security.ports.banned.override" with the value of "21" or the port you chose, if its a blocked port. It let me right in to Zentyal's UI, allowed me to change it back to port 443, and I'm back in business.

SOLVED!

Sam Graf

  • Guest
Glad you got this solved!

Unless I'm mistaken, Zentyal overwrites configuration files only when restarting a service from the Zentyal dashboard or when the machine restarts. You can manually edit a configuration and restart a service from the command line, I think, which doesn't trigger Zentyal's overwrite of configuration files.

Zentyal generally uses Mason templates as the basis for configuration. Some longer term but still temporary configuration changes can be made at that level.

firegs

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
In a case like this, changing the Admin Port for Zentyal's Web UI - exactly WHICH configuration file would be edited? It was overwriting everything I was trying to do when using /etc/init.d/zentyal apache restart - REALLY bothering - I spent nearly 3-4 hours on this, when I finally figured out that no matter what I edited, it was going to revert back - so I looked for another method to solve this issue. I tried to edit apache2.conf, and apache.bak in /var/lib/zentyal/conf/, apache2.conf in /etc/apache2, as well as ports.conf in /etc/apache2 <-- those two seem to not be a part of the Zentyal UI, simply the Webserver.

I'm just curious. Yaknow, for science. =)

Sam Graf

  • Guest
From the documentation:
Quote
Therefore, if you want to make your changes persistent, and prevent them from being overwritten every time Zentyal saves changes, you must edit templates instead of system configuration files. These templates are in /usr/share/zentyal/stubs and their names are the original configuration file names plus the .mas extension.

Though I cannot tell you the exact file name. :-[

It's good to know that Zentyal overwrites configuration files on command line service restart. That's either something new or I've been wrong about that for a very long time.

firegs

  • Zen Apprentice
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
THATS what I was looking for, maybe. For this one, it was in stubs/core/apache.mas.

However, once I look at that file, the line in question reads:

"Listen <% $port %>" <-- Where is the $port variable defined? at the top of the file, theres just this:

<%args>
      $port
(...)
</%args>

I wouldn't want to replace a variable with a hard-coded number, like 443. Is there a location where these variables are set? I think that's what I'm ultimately looking for.
« Last Edit: February 06, 2013, 03:29:07 pm by firegs »