Skip to content
Snippets Groups Projects
Commit 2c58aac9 authored by Robin Appelman's avatar Robin Appelman
Browse files

fix apache proxy config

parent 37bd64e4
No related branches found
No related tags found
No related merge requests found
......@@ -201,6 +201,7 @@ class Setup extends Base {
$output->writeln("Run the following commands to enable the proxy modules");
$output->writeln(" <info>sudo a2enmod proxy</info>");
$output->writeln(" <info>sudo a2enmod proxy_http</info>");
$output->writeln(" <info>sudo a2enmod proxy_wstunnel</info>");
$output->writeln("");
$output->writeln("Then place the following within the <info><VirtualHost></info> block of the apache config for your nextcloud installation");
$output->writeln("which can usually be found within <info>/etc/apache2/sites-enabled/</info>");
......
......@@ -142,10 +142,15 @@ class SetupWizard {
'PORT' => 7867,
'ALLOW_SELF_SIGNED' => $selfSigned ? 'true' : 'false',
'LOG' => 'notify_push=info',
'NEXTCLOUD_URL' => $this->getNextcloudUrl()
'NEXTCLOUD_URL' => $this->getNextcloudUrl(),
]);
// give the server some time to start
usleep(500 * 1000);
for ($i = 0; $i < 20; $i++) {
usleep(100 * 1000);
if ($this->isBinaryRunningAt("localhost:7867")) {
break;
}
}
$status = proc_get_status($proc);
if (!$status['running']) {
proc_terminate($proc);
......@@ -286,7 +291,8 @@ WantedBy = multi-user.target
}
public function apacheConfig(): string {
return "ProxyPass /push/ http://localhost:7867/
return "ProxyPass /push/ws ws://localhost:7867/ws
ProxyPass /push/ http://localhost:7867/
ProxyPassReverse /push/ http://localhost:7867/
";
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment