Issue with web console


#1

If you are using a subdomain + letsencrypt, the “back to dashboard” button will take you to the IP, not the subdomain, which breaks the SSL. This would be a hard thing to fix… maybe an option after the “do you want to change the hostname” that asks “will you be using an IP or hostname?”

and then make a SED line that edits that. i can write the sed (community for the win) and possibly add that option. im pretty decent in perl, just have not really looked at the script.


#2

Funny, I just now noticed this on a test install :expressionless:

I think that is a good plan. Perhaps an FQDN function could be written in, as you say, “will you be using an IP or hostname?”, or perhaps, "if you’re using a fully qualified domain name, enter now: ____ "
Then it reads and passes the domain name to a FQDN.conf file in the apache2 directory… sort of how the Plex package install works, although it does that silently and removes the .conf on uninstall.

Could set this up tomorrow for testing in the Beta Squad.


#3

i got mine working without any sofware added on server… idk if that means i did it wrong… but got rid the problem with always saying was not secure. ssl works… idk


#4

That’s even with a custom subdomain/domain name and not just the IP? If that’s the case, sounds more like you did something incredibly right. I tried it with a custom domain and the result is as expressed. The reason being this bit…

function _quickconsole() {
  CONSOLEIP=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
  sed -i -e "s/console-username/${username}/g" \
         -e "s/console-password/${password}/g" \
         -e "s/ipaccess/$CONSOLEIP/g" /home/${username}/.console/index.php
}

It plants an IP and not a FQDN. I think this could be changed with a _askiffqdn function. Then if yes it would be more like…

function _quickconsole() {
  CONSOLEIP=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
  
  sed -i -e "s/console-username/${username}/g" \
         -e "s/console-password/${password}/g" /home/${username}/.console/index.php
  if [[ ${usefqdn} == "yes" ]]; then 
    sed -i "s/ipaccess/$FQDN/g" /home/${username}/.console/index.php
  else
    sed -i "s/ipaccess/$CONSOLEIP/g" /home/${username}/.console/index.php
  fi
}

#5


#6

tbh i had a friend which own torrent site help me set up domain end of it lol but i watched :smiley:
we did not change anything on server end

i signed up for both and got stuck lol so i sent him a msg to help me out.


#7

Oh, no… the web console is what @denellum is talking about.

https://your_domain.com/your_username.console


#8

you mean this one?


#9

That’s the one. Then hit the Back to dashboard link. It throws you to the IP and could corrupt the SSL… until you navigate back to the domain name.


#10

back works just fine. no problems what so ever


#11

It’s not throwing you to the IP?
If not, then perhaps this got adjusted within the .console/index.php in your users /home/ directory.


#12

i am testing this now, the upgrade from 14.04 to 16 took a while…


#13

i am running on 15 have not upgraded yet waiting for update


#14

my bad… back to dashbored does send to ip XD
when i read it i thought said backspace…

sorry :’(


#15

oh @dtech :rolling_eyes:


#16

can confirm, webconsole “back to dashboard” sends to IP not hostname. i will help with this later tonight. im pretty sure with php there is a way to send “back”. i will get this sed command set up in a bit.


#17

Sounds splendid. I am going to stuff food in my face and relax for a bit… the day has been long.


#18

ill be honest went to celebrate with drinks tonight, will post in the morn.


#19

Here’s what im thinking :

$previous = $_SERVER['HTTP_REFERER'];
<a href="<?= $previous ?>">Back to dashboard</a>

This way it will still be mobile friendly. Your thoughts?


Addressed issue with 'back to' link in web console
QuickBox CHANGELOG
#20

This could work. We can just hardcode this into the .console/index.php template and then there would be no need for inserting anything other than user and pass.

:thumbsup: Adding to next revision

Adding this to the .console/index.php template.