Xgongiveittoya
Xgongiveittoya

Reputation: 753

Setup Apigility on Turnkey Lamp

Hello

I am testing apigility on a Turnkey Lamp stack, and I am stuck on actually getting Apigility to show me its welcome page:

enter image description here
I want that^

Instead, upon visiting the document root of the virtual host I am using "//ipaddress:port/", I am redirected to "/apigility/ui" (This is the correct behavior for apigility)

When I arrive at "//ipaddress:port/apigility/ui" I get

Not Found

The requested URL /apigility/ui was not found on this server.

I am now stuck on how to move forward.

I have:

Made sure that the directory permissions are set correctly

Set up my virtual host (text at the bottom)

Made sure that my apigility dir is at the correct location

Made sure apigility is in development mode

Taken my googlefu to its limit

EDIT: I have also successfully opened a phpinfo.php page that I moved into the public folder of the apigility project

EDIT: If I turn off development mode, I do get the page that says how to turn on development mode. Possibly an issue with dev mode?

Edit: I attempted Rahman's fix, but it did not assist with apigility not correctly serving the apigility/ui page. Although it does seem like a cleaner way to use Apache.

Any help would be much appreciated.

To me it seems like there is some issue with the apigility setup, as it starts to redirect me to the correct location, but cannot find the /apigility/ui page it redirects me to.

Here is my virtual host in my Apache config file (It is in the correct config file)

<VirtualHost *ipaddress*:*port*>
    DocumentRoot "/var/www/apigility/public"
    <Directory "/var/www/apigility/public">
        allow from all
        Options None
        Require all granted
    </Directory>
</VirtualHost>

And of course, all of my assertions could very well be wrong (that's why I am here), but I am pretty sure of their truthfulness.

UPDATE: While Rahman's answer is useful, it does not answer my question. I believe the not found error is related to apigility failing, not Apache incorrectly routing. I will not be accepting that answer, as the problem is not solved. (But would be open to discussion on that answer)

UPDATE: With Rahman's VirtualHost in the apache config file, I only had to enable mod_rewrite, and I can now access the Welcome to Apigility page!

Details on mod_rewrite I found here:

.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration

Upvotes: 1

Views: 695

Answers (1)

‌‌R‌‌‌.
‌‌R‌‌‌.

Reputation: 2954

Not Found error is because your web server neither can find the location on the server nor can find any rewrite rule for requested url.

So considering that Apiagility has a .htaccess file in the public directory, your problem is in the Apache configuration.

I suggest you edit your Apache configuration file like this:

<VirtualHost *ipaddress*:*port*>
    DocumentRoot "/var/www/apigility/public"
    <Directory "/var/www/apigility/public">
        AllowOverride All
        Order deny,allow
        Allow from all
    </Directory>
</VirtualHost>

Upvotes: 1

Related Questions