Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silex website not working #19

Closed
traveltek-tmalek opened this issue Mar 28, 2022 · 3 comments
Closed

Silex website not working #19

traveltek-tmalek opened this issue Mar 28, 2022 · 3 comments

Comments

@traveltek-tmalek
Copy link

traveltek-tmalek commented Mar 28, 2022

Hello,

The instructions for setting this up are no longer complete. I followed along but the link for the Silex website is broken.

I tried to figure it out myself but I am having trouble with it.

I installed Apache on an Ubuntu server.

I changed my /etc/apache2/sites-available/000-default.conf file to the following:

<VirtualHost *:4730>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /usr/local/bin/gearman-ui
        ServerName 10.10.20.124
 <Directory /usr/local/bin/gearman-ui>
        AllowOverride All
    </Directory>

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

vim: syntax=apache ts=4 sw=4 sts=4 sr noet`

I then ran:

sudo find /usr/local/bin/gearman-ui -type d -exec chmod 755 {} ;
sudo find /usr/local/bin/gearman-ui -type f -exec chmod 644 {} ;

I made www-data the group owner, and I have confirmed that this server is listening on port 4730

root@ip-10-10-20-124:/usr/local/bin/gearman-ui# sudo lsof -i:4730
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
apache2 2545 root 6u IPv6 27584 0t0 TCP *:4730 (LISTEN)
apache2 2548 www-data 6u IPv6 27584 0t0 TCP *:4730 (LISTEN)
apache2 2549 www-data 6u IPv6 27584 0t0 TCP *:4730 (LISTEN)

I am not too sure what I am missing. Any time I do a curl I get a 403

[ec2-user@ip-10-10-39-206 ~]$ curl 10.10.20.124:4730
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
<hr>
<address>Apache/2.4.29 (Ubuntu) Server at 10.10.20.124 Port 4730</address>
</body></html>

10.10.20.124 is the IP of this server I have spun up to give us the Gearman stats.

Are there any other instructions I can find that talks me through setting up a web server?

Also it says "Configure the web server to serve the application directory" but is that going to be /usr/local/bin/gearman-ui or /usr/local/bin/gearman-ui/web ?

This server sits in the same subnet and uses the same security groups as the two Gearman servers so the port is allowed. Do I maybe need to use a different port from 4730?

Thanks.

@traveltek-tmalek
Copy link
Author

traveltek-tmalek commented Mar 28, 2022

Now I seem to be getting this when I try to access the index.php file

<?php

require_once __DIR__.'/../vendor/autoload.php';

use Symfony\Component\Debug\ExceptionHandler;

$app = new GearmanUI\GearmanUIApplication();

ExceptionHandler::register();

$app->run();

@traveltek-tmalek
Copy link
Author

I also changed to port 8080 and modified the /etc/apache2/apache2.conf file as well. Just need to figure out this PHP message now when I navigate to the site.

@traveltek-tmalek
Copy link
Author

Never mind I hadn't installed the PHP module for Apache yet. Sorted now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant