Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ISPConfig 3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Manoa Ratefiarison
ISPConfig 3
Commits
df73824d
Commit
df73824d
authored
17 years ago
by
tbrehm
Browse files
Options
Downloads
Patches
Plain Diff
Fixed a bug in apache rewrite rules.
parent
a3576476
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
server/conf/vhost.conf.master
+7
-4
7 additions, 4 deletions
server/conf/vhost.conf.master
server/plugins-enabled/apache2_plugin.inc.php
+5
-0
5 additions, 0 deletions
server/plugins-enabled/apache2_plugin.inc.php
with
12 additions
and
4 deletions
server/conf/vhost.conf.master
+
7
−
4
View file @
df73824d
...
@@ -3,9 +3,10 @@
...
@@ -3,9 +3,10 @@
<VirtualHost <tmpl_var name='ip_address'>:80>
<VirtualHost <tmpl_var name='ip_address'>:80>
DocumentRoot <tmpl_var name='web_document_root'>
DocumentRoot <tmpl_var name='web_document_root'>
ServerName <tmpl_var name='domain'>
ServerName <tmpl_var name='domain'>
<tmpl_if name='alias'>
ServerAlias <tmpl_var name='alias'>
ServerAlias <tmpl_var name='alias'>
RewriteEngine on
</tmpl_if>
<tmpl_if name='cgi'>
<tmpl_if name='cgi'>
# cgi enabled
# cgi enabled
ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
ScriptAlias /cgi-bin/ <tmpl_var name='document_root'>/cgi-bin/
...
@@ -18,7 +19,7 @@
...
@@ -18,7 +19,7 @@
AddOutputFilter INCLUDES .shtml
AddOutputFilter INCLUDES .shtml
</tmpl_if>
</tmpl_if>
<tmpl_if name='suexec'>
<tmpl_if name='suexec'>
# suexec enabled
# suexec enabled
SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
SuexecUserGroup <tmpl_var name='system_user'> <tmpl_var name='system_group'>
</tmpl_if>
</tmpl_if>
<tmpl_if name='php' op='==' value='mod'>
<tmpl_if name='php' op='==' value='mod'>
...
@@ -37,10 +38,12 @@
...
@@ -37,10 +38,12 @@
AddType application/x-httpd-php .php .php3 .php4 .php5
AddType application/x-httpd-php .php .php3 .php4 .php5
</tmpl_if>
</tmpl_if>
<tmpl_if name="rewrite_enabled">
RewriteEngine on
<tmpl_loop name="redirects">
<tmpl_loop name="redirects">
RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
RewriteCond %{HTTP_HOST} ^<tmpl_var name='rewrite_domain'> [NC]
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
RewriteRule ^/(.*)$ <tmpl_var name='rewrite_target'>$1 [<tmpl_var name='rewrite_type'>]
</tmpl_loop>
</tmpl_loop>
</tmpl_if>
</VirtualHost>
</VirtualHost>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
server/plugins-enabled/apache2_plugin.inc.php
+
5
−
0
View file @
df73824d
...
@@ -165,6 +165,11 @@ class apache2_plugin {
...
@@ -165,6 +165,11 @@ class apache2_plugin {
}
}
}
}
$tpl
->
setVar
(
'alias'
,
trim
(
$server_alias
));
$tpl
->
setVar
(
'alias'
,
trim
(
$server_alias
));
if
(
count
(
$rewrite_rules
)
>
0
)
{
$tpl
->
setVar
(
'rewrite_enabled'
,
1
);
}
else
{
$tpl
->
setVar
(
'rewrite_enabled'
,
0
);
}
$tpl
->
setLoop
(
'redirects'
,
$rewrite_rules
);
$tpl
->
setLoop
(
'redirects'
,
$rewrite_rules
);
$vhost_file
=
escapeshellcmd
(
$web_config
[
"vhost_conf_dir"
]
.
'/'
.
$data
[
"new"
][
"domain"
]
.
'.vhost'
);
$vhost_file
=
escapeshellcmd
(
$web_config
[
"vhost_conf_dir"
]
.
'/'
.
$data
[
"new"
][
"domain"
]
.
'.vhost'
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment