Forums / Developer / Setup SSL only with user login page to secure username and password

Setup SSL only with user login page to secure username and password

Author Message

Romeo Antony

Tuesday 11 January 2011 1:22:23 am

Hi,

I would like create an ssl user/login page(in user site access) to secure the username and password for sent it as encrypted. But no idea how to configure it only for a login page.

I would like to set up ssl for complete admin site access. But if I use default virtualhost example provided in ezpublish docs , I can't use ssl for admin site access. (since usersite access and admin site access are in single virtualhost with admin site access as alias)

I should create sepererate virtualhost for admin site access instead of alias for admin site access in single virtualhost to use ssl for admin site access? Isn't?

Regards

Romeo

Gaetano Giunta

Tuesday 11 January 2011 5:28:44 am

If you want to set up https for all of the admin siteaccess and only for part of the public siteaccess, using two vhosts is probably your best bet. You'll also have to buy 2 certs in that case, as you need one separate certificate per hostname.

If you feel like experimenting, you could:

  • enable https in apache (set up 2 identical vhosts, one on port 80, one on port 443)
  • set up ssl in the site.ini of the two siteaccesses: SSLZones=enabled, SSLSubtrees[]=/, ModuleViewAccessMode[*/*]=ssl for admin and SSLZones=enabled, ModuleViewAccessMode[user/login]=ssl for front

Principal Consultant International Business
Member of the Community Project Board

Romeo Antony

Tuesday 11 January 2011 10:32:45 pm

Thanks for the reply. This is what I was exactly looking for.

Romeo Antony

Saturday 15 January 2011 3:56:00 am

Hi,

I have tried .but some issues in setting http and https in public site access.

I should set up port 80 for http request in public site access with, port 443 for ssl request in user/loginmodule/view in public site access ? So that is it better to put two virtualhost for public site access and 3rd virtualhost for admin site access to listen https request on port 443. Is this is a right way for my requirement. Any suggestions or ideas will be a help.

<b>NameVirtualHost *:443
NameVirtualHost *:80</b>

<b><VirtualHost *:80>
        ServerName public_siteaccess</b>
        DocumentRoot /var/www/
        
</VirtualHost>

<b><VirtualHost *:443>
        ServerName public_siteaccess</b>

        DocumentRoot /var/www/
        

        SSLEngine on
        SSLCertificateFile /etc/apache1/ssl/apache.pem
</VirtualHost>



<b><VirtualHost *:443>
        ServerName admin_siteaccess</b>

        DocumentRoot /var/www/
        

        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/apache2.pem
</VirtualHost>

Luis Delgado

Monday 28 February 2011 4:47:58 pm

"

If you want to set up https for all of the admin siteaccess and only for part of the public siteaccess, using two vhosts is probably your best bet. You'll also have to buy 2 certs in that case, as you need one separate certificate per hostname.

If you feel like experimenting, you could:

  • enable https in apache (set up 2 identical vhosts, one on port 80, one on port 443)
  • set up ssl in the site.ini of the two siteaccesses: SSLZones=enabled, SSLSubtrees[]=/, ModuleViewAccessMode[*/*]=ssl for admin and SSLZones=enabled, ModuleViewAccessMode[user/login]=ssl for front
"

Gaetano,

this does work but I'm having a pretty strange issue here.

I have configured access in Host Mode.

I finally got the site to use SSL in my admin.mydomian.com site but when I click either on "Design" or the "Settings" Tab or if I click on Roles link in Users I will be taken out to the front_user host address and an Access Deny. Im the only Administrator of the site.

I have EZP 4.4 with EZFLOW. Right now I have EZP in a subdirectory and a Live site runing on root (We are migrating)...

What can I do to fix this issue?

Cheers

GOOD 4 ALL

Luis Delgado

Monday 07 March 2011 8:47:34 am

Bump...

No idea?

Cheers

GOOD 4 ALL

eZ debug

Timing: Jan 29 2025 23:52:09
Script start
Timing: Jan 29 2025 23:52:09
Module start 'content'
Timing: Jan 29 2025 23:52:09
Module end 'content'
Timing: Jan 29 2025 23:52:09
Script end

Main resources:

Total runtime0.1277 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.2031180.8047
Module start 'content' 0.00600.0059 769.0078102.6328
Module end 'content' 0.01180.1158 871.6406530.4063
Script end 0.1276  1,402.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00372.8965200.0002
Check MTime0.00161.2223200.0001
Mysql Total
Database connection0.00070.512910.0007
Mysqli_queries0.084666.23841410.0006
Looping result0.00100.80561390.0000
Template Total0.115490.410.1154
Template load0.00090.678110.0009
Template processing0.114689.703110.1146
Override
Cache load0.00060.485610.0006
Sytem overhead
Fetch class attribute can translate value0.00090.720510.0009
XML
Image XML parsing0.00020.168410.0002
General
dbfile0.00594.6218200.0003
String conversion0.00000.004130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs