1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 00:20:08 +01:00

Listen on port instead of socket

This commit is contained in:
Adam Wathan
2016-10-25 12:44:11 -04:00
parent 0da0fb3b1b
commit 2ac1711eef
3 changed files with 3 additions and 4 deletions

View File

@@ -61,7 +61,7 @@ function updateConfiguration()
$contents = preg_replace('/^user = .+$/m', 'user = '.user(), $contents);
$contents = preg_replace('/^group = .+$/m', 'group = staff', $contents);
$contents = preg_replace('/^listen = .+$/m', 'listen = /var/run/fpm-valet.sock', $contents);
$contents = preg_replace('/^listen = .+$/m', 'listen = 127.0.0.1:9000', $contents);
$this->files->put($this->fpmConfigPath(), $contents);
}
@@ -74,7 +74,6 @@ function updateConfiguration()
function restart()
{
$this->stop();
$this->brew->restartLinkedPhp();
}

View File

@@ -23,7 +23,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/fpm-valet.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index VALET_SERVER_PATH;
fastcgi_param QUERY_STRING $query_string;

View File

@@ -29,7 +29,7 @@ public function test_fpm_is_configured_with_the_correct_user_group_and_port()
$contents = file_get_contents(__DIR__.'/output/fpm.conf');
$this->assertTrue(strpos($contents, sprintf("\nuser = %s", user())) !== false);
$this->assertTrue(strpos($contents, "\ngroup = staff") !== false);
$this->assertTrue(strpos($contents, "\nlisten = /var/run/fpm-valet.sock") !== false);
$this->assertTrue(strpos($contents, "\nlisten = 127.0.0.1:9000") !== false);
}
}