Koozali.org: home of the SME Server

config setprop publicaccess for smeserver-phpsysinfo-2.5.4-0dmay.noarch.rpm

Offline 7eis

  • *
  • 47
  • +0/-0
I figured I'd stick to the /opt/ for this application instead of an ibay. The contrib works very well and the only thing thing that needs change is the os-logo issue: http://forums.contribs.org/index.php?topic=33483.msg142846#msg142846
This contrib is restricted to https admin-login only. I tried to change it to global access non https using the usual commands, but with no luck.

Used the following commands:
Code: [Select]
config setprop phpsysinfo PublicAccess global
config setprop phpsysinfo HTTPS off

Information about PublicAccess
http://wiki.contribs.org/Web_Application_RPM#New_DB_settings

Any hints on this issue?

happy holidays
7eis
« Last Edit: December 23, 2007, 04:10:27 PM by 7eis »

Offline raem

  • *
  • 3,972
  • +4/-0
7eis

If you disable https access for phpsysinfo, then you are logging in with your admin password without a secure connection which is a bad idea, as your password could be easily read/intercepted.

To enable public access try this

config setprop phpsysinfo access public
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart

...

Offline raem

  • *
  • 3,972
  • +4/-0
7eis

If you are wanting to allow access for other users than admin, this generic howto may help
Apply it to your situation
http://wiki.contribs.org/Htaccess
...

Offline 7eis

  • *
  • 47
  • +0/-0
Thanks for the link. I am aware that logins without encryption easily can be eavesdropped. But as you found out I want everybody to view the webapp - with no login required, and with https off.

I'll look in to it and return - possibly with a solution.

Regards
7eis

first edit:
the
Code: [Select]
config setprop phpsysinfo access public
expand-template /etc/httpd/conf/httpd.conf
/etc/init.d/httpd-e-smith restart
dident change anything
« Last Edit: December 23, 2007, 11:45:06 PM by 7eis »

Offline raem

  • *
  • 3,972
  • +4/-0
7eis

Quote
....I want everybody to view the webapp - with no login required, and with https off.

For a start you would need to edit/remove the https redirection template fragment in /etc/httpd/conf/httpd.conf/...


Quote
config setprop phpsysinfo access public ......
did'nt change anything

Well that has probably allowed external https access.
...

Offline stephen noble

  • *
  • 607
  • +1/-0
    • Dungog
nformation about PublicAccess
http://wiki.contribs.org/Web_Application_RPM#New_DB_settings

this is only a guide to rpm developers, it doesn't mean they follow it

Offline 7eis

  • *
  • 47
  • +0/-0
Update: Gave up and installed it in a ibay instead :-(

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Update: Gave up and installed it in a ibay instead :-(

With the RPM, two files are important to you.

/etc/esmith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpsysinfoAlias

and

/etc/esmith/templates/etc/httpd/conf/httpd.conf/86PhpsysinfoAlias

I would create new files under the templates-custom tree.

30PhpsysinfoAlias would be empty and 86PhpsysinfoAlias would contain-


Code: [Select]
# phpSysInfo
Alias /phpsysinfo /opt/phpsysinfo
<Directory /opt/phpsysinfo>
    SSLRequireSSL on
    Options -Indexes
    AllowOverride None
    order deny,allow
    deny from all
    allow from all
    Satisfy all
    AddType application/x-httpd-php .php .php3
    php_flag  magic_quotes_gpc  on
    php_flag  track_vars        on
</Directory>

Then expand httpd.conf

https://secure.magicwilly.info/phpsysinfo/
Regards,
William

IF I give advise.. It's only if it was me....

Offline 7eis

  • *
  • 47
  • +0/-0
I tried something similar myself, but with no luck.

I Figured I would give your suggestion a try, so..

Made the following files:
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/86PhpsysinfoAlias (with the code you provided)
/etc/e-smith/templates-custom/etc/httpd/conf/VirtualHosts/30PhpsysinfoAlias (blank)

Expanded the templates for httpd.conf with expand-template
expand-template /etc/httpd/conf/httpd.conf
and restarted the httpd
/etc/init.d/httpd-e-smith restart

Did I get you right?

I somehow messed it up, as it wouldn't respond on any of the machines domains and IP's. Logs shows a clean restart of the service and there are no complaints whatsoever :-( note to self: play around with a less trimmed 30PhpsysinfoAlias

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
Take a look at the resultant httpd.conf

Do you have blank lines at the top and bottom of the phpsysinfo section. This caused me a problem with something else once but I think apache threw a woobly.

30PhpsysinfoAlias is there to rewrite http to https

Code: [Select]
    require user admin
    Satisfy all
    AddType application/x-httpd-php .php .php3
    php_flag  magic_quotes_gpc  on
    php_flag  track_vars        on
</Directory>

# phpSysInfo
Alias /phpsysinfo /opt/phpsysinfo
<Directory /opt/phpsysinfo>
    SSLRequireSSL on
    Options -Indexes
    AllowOverride None
    order deny,allow
    deny from all
    allow from all
    Satisfy all
    AddType application/x-httpd-php .php .php3
    php_flag  magic_quotes_gpc  on
    php_flag  track_vars        on
</Directory>




# knowledgetree3
Alias /dms /opt/knowledgetree3
<Directory /opt/knowledgetree3>
    SSLRequireSSL on
    Options -Indexes
    AllowOverride all
    order deny,allow

ps. Possibly a redundent 'deny from all' in there also.

pps.

Actually, if you just copy across the original 86 template and remove

Code: [Select]
AuthName "phpSysInfo"
    AuthType Basic
    AuthExternal pwauth
    require user admin

then you wont need to login in and the db will still control where you can view the page from. ie. Everywhere or just local.
« Last Edit: December 30, 2007, 11:52:49 PM by william_syd »
Regards,
William

IF I give advise.. It's only if it was me....

Offline william_syd

  • ****
  • 1,608
  • +0/-0
  • Nothing to see here.
    • http://www.magicwilly.info
How did you go?

I've had another play with the RPM (previous installs were manual).

Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts
Code: [Select]
touch /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/VirtualHosts/30PhpsysinfoAlias
Code: [Select]
cp /etc/e-smith/templates/etc/httpd/conf/httpd.conf/86PhpsysinfoAlias \
/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/86PhpsysinfoAlias
Code: [Select]
pico -w /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/86PhpsysinfoAlias
Comment out the lines as indicated #

Code: [Select]
# phpsysinfo
Alias /phpsysinfo /opt/phpsysinfo
<Directory /opt/phpsysinfo>
#    SSLRequireSSL
    Options -Indexes
    AllowOverride None
    order deny,allow
    deny from all
{
my $access = ($phpsysinfo{'access'} || 'private');
if ("$access" eq "private")
    {
    $OUT .= "    allow from $localAccess $externalSSLAccess";
    }
    elsif ("$access" eq "public")
    {
    $OUT .= "    allow from all";
    }
}
#    AuthName "phpSysInfo"
#    AuthType Basic
#    AuthExternal pwauth
#    require user admin
    Satisfy all
    AddType application/x-httpd-php .php .php3
    php_flag  magic_quotes_gpc  on
    php_flag  track_vars        on
</Directory>

Code: [Select]
config setprop phpsysinfo access public
Code: [Select]
expand-template /etc/httpd/conf/httpd.conf
Code: [Select]
/etc/rc.d/rc7.d/S86httpd-e-smith restart
Regards,
William

IF I give advise.. It's only if it was me....

Offline 7eis

  • *
  • 47
  • +0/-0
 :-)Tried it out and works like a charm on both a fresh install and my slightly customized server.

Thanks a lot for looking in to it!