Skip to content

Commit

Permalink
修正Apache开启默认站点导致无法获取负载状态的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
showpy committed Jun 18, 2019
1 parent 675d0d4 commit acc53bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions BTPanel.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@
</PropertyGroup>
<ItemGroup>
<Compile Include="class\ajax.py" />
<Compile Include="class\apache.py" />
<Compile Include="class\btkill.py" />
<Compile Include="class\common.py" />
<Compile Include="class\config.py" />
<Compile Include="class\crontab.py" />
<Compile Include="class\crontab_ssl.py" />
<Compile Include="class\data.py" />
<Compile Include="class\database.py" />
<Compile Include="class\datatool.py" />
Expand Down Expand Up @@ -780,6 +782,7 @@
<Content Include="BTPanel\static\js\jquery.qrcode.min.js" />
<Content Include="BTPanel\static\js\public.js" />
<Content Include="BTPanel\static\js\requestAnimationFrame.js" />
<Content Include="BTPanel\static\js\site.js" />
<Content Include="BTPanel\static\js\socket.io.min.js" />
<Content Include="BTPanel\static\js\upload.js" />
<Content Include="BTPanel\static\js\Validform_v5.3.2_min.js" />
Expand Down
4 changes: 3 additions & 1 deletion class/panelSite.py
Original file line number Diff line number Diff line change
Expand Up @@ -3493,8 +3493,10 @@ def SetDefaultSite(self,get):
if os.path.exists(path):
conf = '''<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^127.0.0.1 [NC]
RewriteRule (.*) http://%s/$1 [L]
</IfModule>''' % (get.name,)
</IfModule>'''
conf = conf.replace("%s",get.name)
if get.name == 'off': conf = '';
public.writeFile(path + '/.htaccess',conf);

Expand Down

0 comments on commit acc53bd

Please sign in to comment.