Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ISPConfig 3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lolo888
ISPConfig 3
Commits
d0356fdd
Commit
d0356fdd
authored
Feb 15, 2014
by
Till Brehm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed: FS#3169 - Defaults "apps" Port 8081 overwrites custom port
parent
65584a9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
install/lib/install.lib.php
install/lib/install.lib.php
+26
-0
install/lib/installer_base.lib.php
install/lib/installer_base.lib.php
+5
-0
No files found.
install/lib/install.lib.php
View file @
d0356fdd
...
...
@@ -718,6 +718,32 @@ function get_ispconfig_port_number() {
}
}
/*
* Get the port number of the ISPConfig apps vhost
*/
function
get_apps_vhost_port_number
()
{
global
$conf
;
if
(
$conf
[
'nginx'
][
'installed'
]
==
true
){
$ispconfig_vhost_file
=
$conf
[
'nginx'
][
'vhost_conf_dir'
]
.
'/apps.vhost'
;
$regex
=
'/listen (\d+)/'
;
}
else
{
$ispconfig_vhost_file
=
$conf
[
'apache'
][
'vhost_conf_dir'
]
.
'/apps.vhost'
;
$regex
=
'/\<VirtualHost.*\:(\d{1,})\>/'
;
}
if
(
is_file
(
$ispconfig_vhost_file
))
{
$tmp
=
file_get_contents
(
$ispconfig_vhost_file
);
preg_match
(
$regex
,
$tmp
,
$matches
);
$port_number
=
@
intval
(
$matches
[
1
]);
if
(
$port_number
>
0
)
{
return
$port_number
;
}
else
{
return
'8081'
;
}
}
}
/*
* Get the port number of the ISPConfig controlpanel vhost
*/
...
...
install/lib/installer_base.lib.php
View file @
d0356fdd
...
...
@@ -1511,6 +1511,11 @@ class installer_base {
$vhost_conf_dir
=
$conf
[
'apache'
][
'vhost_conf_dir'
];
$vhost_conf_enabled_dir
=
$conf
[
'apache'
][
'vhost_conf_enabled_dir'
];
$apps_vhost_servername
=
(
$conf
[
'web'
][
'apps_vhost_servername'
]
==
''
)
?
''
:
'ServerName '
.
$conf
[
'web'
][
'apps_vhost_servername'
];
//* Get the apps vhost port
if
(
$this
->
is_update
==
true
)
{
$conf
[
'web'
][
'apps_vhost_port'
]
=
get_apps_vhost_port_number
();
}
// Dont just copy over the virtualhost template but add some custom settings
$content
=
rfsel
(
$conf
[
'ispconfig_install_dir'
]
.
'/server/conf-custom/install/apache_apps.vhost.master'
,
'tpl/apache_apps.vhost.master'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment