mirror of
https://github.com/opensolutions/ViMbAdmin.git
synced 2026-04-26 08:45:54 +03:00
[GH-ISSUE #31] ViMbAdmin on non-standard port #26
Labels
No labels
bug
feature
feature
improvement
improvement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ViMbAdmin-opensolutions#26
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @soalhn on GitHub (Jan 10, 2013).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/31
Hi,
I've just installed ViMbAdmin 2.2.2 and noticed that there is an issue in running ViMbAdmin on non-standard port, e.g. https://example.com:8443/mailadmin/ (and in my case non-standard alias "mailadmin").
The first page displays without loading proper css - just like plain html (I've included screenshot - after setup an administrator's account).
As you can see, there's no port "8443" on the browser's status bar.
I've done quick workaround by changing the file "library/ViMbAdmin/Controller/Action.php":
if( isset( $_SERVER['SERVER_NAME'] ) ) $view->pagebase = "http{$ssl}://{$_SERVER['SERVER_NAME']}" . Zend_Controller_Front::getInstance()->getBaseUrl();and adding "Server_PORT" to the "pagebase":
if( isset( $_SERVER['SERVER_NAME'] ) ) $view->pagebase = "http{$ssl}://{$_SERVER['SERVER_NAME']}:{$_SERVER['SERVER_PORT']}" . Zend_Controller_Front::getInstance()->getBaseUrl();But I think there should be some checks before, e.g. set the port to other variable in case we are running on non-standard port.

@InRong commented on GitHub (Dec 17, 2013):
Hi,
That is a little specific, more generic would be to replace it with the following:
This may not be the most efficient checking, but I think it catches everything, and it works for http. Just realised it needs something more for HTTPS on 443......
@dxtr commented on GitHub (Dec 20, 2013):
Isn't
$_SERVER['SERVER_PORT']ALWAYS there?InRongs option just seems awfully weird.
@barryo commented on GitHub (Feb 15, 2014):
Should be working fine in V3. At least it works for me. Let us know if there is still an issue under V3.