Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
76329592
Commit
76329592
authored
May 05, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable new MVC code by default (http alias and rewrite rules)
parent
05523245
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
system.inc
src/etc/inc/system.inc
+11
-9
No files found.
src/etc/inc/system.inc
View file @
76329592
...
@@ -879,7 +879,7 @@ function system_generate_lighty_config(
...
@@ -879,7 +879,7 @@ function system_generate_lighty_config(
if
(
$captive_portal
!==
false
)
{
if
(
$captive_portal
!==
false
)
{
$captiveportal
=
',"mod_evasive"'
;
$captiveportal
=
',"mod_evasive"'
;
$
captive_portal_rewrite
=
"url.rewrite-once = (
\"
(.*captiveportal.*)
\"
=>
\"
$1
\"
,
\"
(.*)
\"
=>
\"
/index.php?zone=
{
$captive_portal
}
&redirurl=$1
\"
)
\n
"
;
$
http_rewrite_rules
=
"url.rewrite-once = (
\"
(.*captiveportal.*)
\"
=>
\"
$1
\"
,
\"
(.*)
\"
=>
\"
/index.php?zone=
{
$captive_portal
}
&redirurl=$1
\"
)
\n
"
;
$maxprocperip
=
$config
[
'captiveportal'
][
$captive_portal
][
'maxprocperip'
];
$maxprocperip
=
$config
[
'captiveportal'
][
$captive_portal
][
'maxprocperip'
];
if
(
empty
(
$maxprocperip
))
if
(
empty
(
$maxprocperip
))
...
@@ -892,7 +892,15 @@ function system_generate_lighty_config(
...
@@ -892,7 +892,15 @@ function system_generate_lighty_config(
$cgi_config
=
""
;
$cgi_config
=
""
;
}
else
{
}
else
{
$captiveportal
=
",
\"
mod_cgi
\"
"
;
$captiveportal
=
",
\"
mod_cgi
\"
"
;
$captive_portal_rewrite
=
""
;
$http_rewrite_rules
=
<<<EOD
### Phalcon ui and api routing
alias.url += ( "/ui/" => "/usr/local/opnsense/www/" )
alias.url += ( "/api/" => "/usr/local/opnsense/www/" )
url.rewrite-if-not-file = ( "^/ui/(.*)$" => "/ui/index.php?_url=/$1" ,
"^/api/(.*)$" => "/api/api.php?_url=/$1"
)
EOD;
$captive_portal_mod_evasive
=
""
;
$captive_portal_mod_evasive
=
""
;
$server_upload_dirs
=
"server.upload-dirs = (
\"
{
$g
[
'upload_path'
]
}
/
\"
,
\"
/tmp/
\"
,
\"
/var/
\"
)
\n
"
;
$server_upload_dirs
=
"server.upload-dirs = (
\"
{
$g
[
'upload_path'
]
}
/
\"
,
\"
/tmp/
\"
,
\"
/var/
\"
)
\n
"
;
$server_max_request_size
=
"server.max-request-size = 2097152"
;
$server_max_request_size
=
"server.max-request-size = 2097152"
;
...
@@ -991,14 +999,8 @@ server.max-keep-alive-idle = 30
...
@@ -991,14 +999,8 @@ server.max-keep-alive-idle = 30
## server.virtual-* options
## server.virtual-* options
server.document-root = "{$document_root}"
server.document-root = "{$document_root}"
### todo implement phalcon ui and api routing
#alias.url += ( "/ui/" => "/usr/local/opnsense/www/" )
#alias.url += ( "/api/" => "/usr/local/opnsense/www/" )
#url.rewrite-if-not-file = ( "^/ui/(.*)$" => "/ui/index.php?_url=/$1" ,
# "^/api/(.*)$" => "/api/api.php?_url=/$1"
#)
{$
captive_portal_rewrite
}
{$
http_rewrite_rules
}
# Maximum idle time with nothing being written (php downloading)
# Maximum idle time with nothing being written (php downloading)
server.max-write-idle = 999
server.max-write-idle = 999
...
...
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