CLI serve command: fix default public root URL
This commit is contained in:
parent
eb6161aa6c
commit
882ba3b672
2 changed files with 2 additions and 4 deletions
|
@ -311,7 +311,7 @@ Additional parameters:
|
|||
*/
|
||||
public static function cli_serve($command_args) {
|
||||
$listen_address = null;
|
||||
$public_url = null;
|
||||
$public_url = "/";
|
||||
$enable_profiler = false;
|
||||
$profiler_output_dir = realpath(getcwd());
|
||||
for($i=0; $i < count($command_args); $i++) {
|
||||
|
@ -376,8 +376,6 @@ Additional parameters:
|
|||
I18n::_('Invalid listen port specified. Must be a positive integer between 1 and 65535.')
|
||||
);
|
||||
$listen_address = implode(':', $parts);
|
||||
if (is_null($public_url))
|
||||
$public_url = sprintf("http://%s:%s", $parts[0]=='0.0.0.0'?'127.0.0.1':$parts[0], $parts[1]);
|
||||
|
||||
$public_html = App::get('root_directory_path')."/public_html";
|
||||
chdir($public_html) or self :: fatal_error(
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<meta name="description" content=""/>
|
||||
<meta name="author" content=""/>
|
||||
|
||||
<base href="{$public_root_url}/"/>
|
||||
<base href="{if $public_root_url!= "/"}{$public_root_url}{/if}/"/>
|
||||
{block name="head"}{/block}
|
||||
|
||||
{block name="favicon"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue