ssl Login output 404.

General chit chat about razor, not specifically related to a topic but about razorCMS

ssl Login output 404.

Postby mhinnes » Fri Jul 11, 2014 10:28 am

Tried to login on my website through https://mysite.com/login and returns 404 error.
My Apache server has SSL enabled with certificate, it allows remote access to port 443.
Rest of the pages generated by razor CMS don't work with the https://, I can navigate, even login from http://. But as https:// is pointed to login ,401 or else then a 404 apache error is returned.

Is there any way that SSL can be implemented for login? That was in the first place why I enable SSL in my server, to have secure logins.

Thank you.

Edited: for clarification.
mhinnes
 
Posts: 5
Joined: Mon Jul 07, 2014 11:01 am

Re: ssl Login output 404.

Postby smiffy6969 » Sat Jul 12, 2014 1:13 am

Hiya,

sorry for the oversight... can you try the following for me please.

index.php

change line 20

Code: Select all
define("RAZOR_BASE_URL", "http://".$_SERVER["SERVER_NAME"].$port.str_replace(array("index.php"), "", $_SERVER["SCRIPT_NAME"]));


to this

Code: Select all
define("RAZOR_BASE_URL", (!empty($_SERVER['https']) ? "https://" : "http://").$_SERVER["SERVER_NAME"].$port.str_replace(array("index.php"), "", $_SERVER["SCRIPT_NAME"]));


rars/index.php

change line 15

Code: Select all
define("RARS_BASE_URL", "http://".$_SERVER["SERVER_NAME"].($_SERVER["SERVER_PORT"] == "80" ? "" : ":{$_SERVER["SERVER_PORT"]}").str_replace(array("index.php"), "", $_SERVER["SCRIPT_NAME"]));


to this

Code: Select all
define("RARS_BASE_URL", (!empty($_SERVER['https']) ? "https://" : "http://").$_SERVER["SERVER_NAME"].($_SERVER["SERVER_PORT"] == "80" ? "" : ":{$_SERVER["SERVER_PORT"]}").str_replace(array("index.php"), "", $_SERVER["SCRIPT_NAME"]));


change line 17

Code: Select all
define("RAZOR_BASE_URL", "http://".$_SERVER["SERVER_NAME"].($_SERVER["SERVER_PORT"] == "80" ? "" : ":{$_SERVER["SERVER_PORT"]}").str_replace(array("rars/index.php"), "", $_SERVER["SCRIPT_NAME"]));


to this

Code: Select all
define("RAZOR_BASE_URL", (!empty($_SERVER['https']) ? "https://" : "http://").$_SERVER["SERVER_NAME"].($_SERVER["SERVER_PORT"] == "80" ? "" : ":{$_SERVER["SERVER_PORT"]}").str_replace(array("rars/index.php"), "", $_SERVER["SCRIPT_NAME"]));


I think this should solve your problem, if it does can you please respond back and i will update for the next release.

thanks

Paul
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: ssl Login output 404.

Postby mhinnes » Sat Jul 12, 2014 9:37 am

Thanks for the answer.
I did modified the index.php file at ../ in the line 20, and index.php at rars/ in line 15 and 17 as you suggested.
I restarted Apache, and checked again for write permissions on the server side. So far so good.
Still get the 404 "Not Found
The requested URL /login was not found on this server."
Anyway as I said thank you for the attention. If https will be implemented in future releases I look forward to it.
At the moment I stick with what I have, because I like very much the razorCMS.

Keep up the good work.
Greets.

P.S: Just to add something, and beforehand I'm not expert not try to be. I found in the lines you suggested that you stated the prefix https: but I only saw reflected port 80 in the code not sign of port 443 that is for https. Is that not necessary? As I said, just my perception.
mhinnes
 
Posts: 5
Joined: Mon Jul 07, 2014 11:01 am

Re: ssl Login output 404.

Postby smiffy6969 » Sat Jul 12, 2014 10:53 am

Well done sir! that will be a problem, I was reading this last night after the pub, and I didn't even think about the port.

While the fix I suggested will solve https issue, the port may be causing an issue.

I need to sit and think of a more stable solution for grabbing root that does not affect https. At this moment in time I cannot devote any time to this, I am trying to completely re-write the UI framework to solve few problems and also move towards web components. This is going to take up my time for the next few weeks. I will look into https at some point, I just want to get this out the way as it is an important change for me.

ta

Paul
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK

Re: ssl Login output 404.

Postby mhinnes » Sun Jul 13, 2014 1:48 am

Oks, sounds good!
Looking forward for the next release.

Greets.
mhinnes
 
Posts: 5
Joined: Mon Jul 07, 2014 11:01 am

Re: ssl Login output 404.

Postby smiffy6969 » Thu Jun 04, 2015 7:20 am

What does that link have to do with angular js dick head? At least when you are going to spam, have the decency to at least make your comment meaningful instead of drivel. Doesn't matter if English is bad or not, drivel is drivel.....

Do you not think we get tired of cleaning this shite up day after day, the off topic rants with the dumbass spam link that has no other reason than to try and tag a phrase to a link for the search engines.

It's people like you that ruin things for everyone else, you waste my time their time, force stupid restrictions on forums, all because your a complete dock head that does not care about anyone but themselves and making money....

Look at you self in the mirror tomorrow morning and see if you got what you wanted out of life, look at your empty soul and feel happy with yourself.

Stop spamming moron, I will ban you, and all those around your IP, the more it happens the wider the net becomes, so all those legitimate users around you loose out...

Find something worthy in life..... Spend your time helping those that need and deserve it.

Paul
smiffy6969
 
Posts: 1866
Joined: Sat May 24, 2008 8:18 am
Location: Loughborough, UK


Return to General Discussions



Who is online

Users browsing this forum: No registered users and 1 guest

cron