Neos "/setup" no controller

Hi dudes,

i’m new to Neos and have some trouble to get it running.
I’ve installed it via composer into a subdirectory on my local server (MAMP).
Then i created a Virtual-Host:

<VirtualHost *:80>
    DocumentRoot "/Applications/MAMP/htdocs/neos/Neos/Web"
    # skip the following line for development
    # SetEnv FLOW_CONTEXT Production
    ServerName neos.demo
</VirtualHost> 

I also added the “neos.demo” domain into my /etc/hosts file.
Then i made some changes in the .htaccess file in the /Web directory:

#
# Flow context setting
#

# You can specify a default context by activating this option:
# SetEnv FLOW_CONTEXT Production

# If the root path is not the parent of the Web directory,
# Flow's root path must be specified manually:
# SetEnv FLOW_ROOTPATH /var/www/myapp/

#
# mod_rewrite configuration
#
<IfModule mod_rewrite.c>

	# Enable URL rewriting
	RewriteEngine On

	# Set flag so we know URL rewriting is available
	SetEnv FLOW_REWRITEURLS 1

	# You will have to change the path in the following option if you
	# experience problems while your installation is located in a subdirectory
	# of the website root.
	RewriteBase /neos/Neos/Web/

	# Stop rewrite processing no matter if a package resource, robots.txt etc. exists or not
	RewriteRule ^(_Resources/Packages/|robots\.txt|favicon\.ico) - [L]

	# Stop rewrite process if the path points to a static file anyway
	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -l [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule .* - [L]

	# Make sure that not existing resources don't execute Flow
	RewriteRule ^_Resources/.* - [L]

	# Continue only if the file/symlink/directory does not exist
	RewriteRule (.*) index.php

</IfModule>

<IfModule mod_negotiation.c>

	# prevents Apache's automatic file negotiation, it breaks resource URLs
	Options -MultiViews

</IfModule>

<IfModule mod_setenvif.c>

	# Redirect authorization header when PHP is running as CGI
	SetEnvIfNoCase Authorization "Basic ([a-zA-Z0-9\+/=]+)" REMOTE_AUTHORIZATION=$0

</IfModule>

ErrorDocument 500 "<h1>Application Error</h1><p>The Flow application could not be launched.</p>"

Also i configured the “Configuration/Development/Settings.yml”:

#                                                                        #
# Example Settings                                                       #
#                                                                        #
# This file contains settings for various parts of the application.      #
# Copy this file to Settings.yaml, and adjust as necessary.              #
#                                                                        #
# Please refer to the default settings file(s) or the manuals for        #
# possible configuration options.                                        #
#                                                                        #

TYPO3:
  Flow:
    persistence:
      backendOptions:
        dbname: 'flow'       # adjust to your database name
        user: 'root'             # adjust to your database user
        password: 'root'         # adjust to your database password

       # if you want to log executed SQL queries, enable the next 2 lines
#      doctrine:
#        sqlLogger: 'TYPO3\Flow\Persistence\Doctrine\Logging\SqlLogger'

And the “Routes.yml”:

#                                                                        #
# Routes configuration                                                   #
#                                                                        #
# This file contains the configuration for the MVC router.               #
# Just add your own modifications as necessary.                          #
#                                                                        #
# Please refer to the Flow manual for possible configuration options.    #
#                                                                        #

##
# TYPO3 Neos subroutes

-
  name: 'TYPO3 Neos'
  uriPattern: 'neos/Neos/Web/<TYPO3NeosSubroutes>'
  subRoutes:
    'TYPO3NeosSubroutes':
      package: 'TYPO3.Neos'
      variables:
        'defaultUriSuffix': '.html'

Right now i am able to setup the database via console (but i removed it).
The goal is (correct me if i’m wrong) to setup the system via “/setup”.
The problem is, when i try to go to “/setup” i get this error message:

Page Not Found
Sorry, the page you requested was not found.
#1303209195: No controller could be resolved which would match your request. Package key: "", controller name: "Standard". (GET http://neos.demo/neos/Neos/Web/setup)

I also tried to get the route via console. But there is no entry. Neos is running in development context (made a var_dump). I also cleared the cache. The logfile says:

16-02-17 10:43:42 51615      NOTICE    Flow                 Router route(): No route matched the route path "setup".
16-02-17 10:43:42 51615      DEBUG     Flow                 CSRF: No token required, safe request

Here is a list of the routes:

./flow routing:list
Currently registered routes:
1. neos/Neos/Web/neos/login(.{@format})                                         TYPO3 Neos :: Authentication :: Login form
2. neos/Neos/Web/neos/login(.{@format})                                         TYPO3 Neos :: Authentication :: Authenticate
3. neos/Neos/Web/neos/logout(.{@format})                                        TYPO3 Neos :: Authentication :: Logout
4. neos/Neos/Web/neos                                                           TYPO3 Neos :: Backend :: Overview
5. neos/Neos/Web/neos/content/assets(/{@action}).{@format}                      TYPO3 Neos :: Backend :: Content Module - Media Browser
6. neos/Neos/Web/neos/content/images(/{@action}).{@format}                      TYPO3 Neos :: Backend :: Content Module - Image Browser
7. neos/Neos/Web/neos/content/upload-asset                                      TYPO3 Neos :: Backend :: Content Module - Asset upload
8. neos/Neos/Web/neos/content/image-with-metadata                               TYPO3 Neos :: Backend :: Content Module - Image metadata
9. neos/Neos/Web/neos/content/asset-with-metadata                               TYPO3 Neos :: Backend :: Content Module - Asset metadata
10. neos/Neos/Web/neos/content/create-image-variant                             TYPO3 Neos :: Backend :: Content Module - Create ImageVariant
11. neos/Neos/Web/neos/content/plugin-views                                     TYPO3 Neos :: Backend :: Content Module - Plugin Views
12. neos/Neos/Web/neos/content/master-plugins                                   TYPO3 Neos :: Backend :: Content Module - Master Plugins
13. neos/Neos/Web/neos/schema/vie                                               TYPO3 Neos :: Backend :: Schema - VIE
14. neos/Neos/Web/neos/schema/node-type                                         TYPO3 Neos :: Backend :: Schema - NodeType
15. neos/Neos/Web/neos/menu                                                     TYPO3 Neos :: Backend :: Menu
16. neos/Neos/Web/neos/settings/{@action}                                       TYPO3 Neos :: Backend :: Settings
17. neos/Neos/Web/neos/{module}                                                 TYPO3 Neos :: Backend :: Modules
18. neos/Neos/Web/neos/{module}/{moduleArguments}                               TYPO3 Neos :: Backend :: Modules & arguments
19. neos/Neos/Web/neos/xliff.json                                               TYPO3 Neos :: Backend :: Backend UI XLIFF labels
20. neos/Neos/Web/neos/service/nodes                                            TYPO3 Neos :: Service :: Nodes - index
21. neos/Neos/Web/neos/service/nodes/{identifier}                               TYPO3 Neos :: Service :: Nodes - single node
22. neos/Neos/Web/neos/service/nodes                                            TYPO3 Neos :: Service :: Nodes - create/adopt node
23. neos/Neos/Web/neos/service/user-preferences                                 TYPO3 Neos :: Service :: Services - UserPreferencesController->index
24. neos/Neos/Web/neos/service/user-preferences                                 TYPO3 Neos :: Service :: Services - UserPreferencesController->update
25. neos/Neos/Web/neos/service/assets                                           TYPO3 Neos :: Service :: Assets - index
26. neos/Neos/Web/neos/service/assets/{identifier}                              TYPO3 Neos :: Service :: Assets - single asset
27. neos/Neos/Web/neos/service/workspaces                                       TYPO3 Neos :: Service :: Services - WorkspacesController->indexAction()
28. neos/Neos/Web/neos/service/workspaces/{workspace}                           TYPO3 Neos :: Service :: Services - WorkspacesController->showAction()
29. neos/Neos/Web/neos/service/workspaces/{baseWorkspace}/{workspaceName}       TYPO3 Neos :: Service :: Services - WorkspacesController->createAction()
30. neos/Neos/Web/neos/service/workspaces/{workspace.__identity}                TYPO3 Neos :: Service :: Services - WorkspacesController->updateAction()
31. neos/Neos/Web/neos/service/workspaces-rpc/get-workspace-wide-unpublished-nodesTYPO3 Neos :: Service :: Services - WorkspaceController->getWorkspaceWideUnpublishedNodes
32. neos/Neos/Web/neos/service/workspaces-rpc/publish-node                      TYPO3 Neos :: Service :: Services - WorkspaceController->publishNode
33. neos/Neos/Web/neos/service/workspaces-rpc/publish-nodes                     TYPO3 Neos :: Service :: Services - WorkspaceController->publishNodes
34. neos/Neos/Web/neos/service/workspaces-rpc/discard-node                      TYPO3 Neos :: Service :: Services - WorkspaceController->discardNode
35. neos/Neos/Web/neos/service/workspaces-rpc/discard-nodes                     TYPO3 Neos :: Service :: Services - WorkspaceController->discardNodes
36. neos/Neos/Web/neos/service/workspaces-rpc/publish-all                       TYPO3 Neos :: Service :: Services - WorkspaceController->publishAll
37. neos/Neos/Web/neos/service/workspaces-rpc/discard-all                       TYPO3 Neos :: Service :: Services - WorkspaceController->discardAll
38. neos/Neos/Web/neos/service/node/get-child-nodes-for-tree                    TYPO3 Neos :: Service :: Services - NodeController->getChildNodesForTree
39. neos/Neos/Web/neos/service/node/filter-child-nodes-for-tree                 TYPO3 Neos :: Service :: Services - NodeController->filterChildNodesForTree
40. neos/Neos/Web/neos/service/node/search-page                                 TYPO3 Neos :: Service :: Services - NodeController->searchPage
41. neos/Neos/Web/neos/service/node/create                                      TYPO3 Neos :: Service :: Services - NodeController->create
42. neos/Neos/Web/neos/service/node/create-and-render                           TYPO3 Neos :: Service :: Services - NodeController->createAndRender
43. neos/Neos/Web/neos/service/node/create-node-for-the-tree                    TYPO3 Neos :: Service :: Services - NodeController->createNodeForTheTree
44. neos/Neos/Web/neos/service/node/discard-node                                TYPO3 Neos :: Service :: Services - NodeController->discardNode
45. neos/Neos/Web/neos/service/node/move                                        TYPO3 Neos :: Service :: Services - NodeController->move
46. neos/Neos/Web/neos/service/node/move-and-render                             TYPO3 Neos :: Service :: Services - NodeController->moveAndRender
47. neos/Neos/Web/neos/service/node/copy                                        TYPO3 Neos :: Service :: Services - NodeController->copy
48. neos/Neos/Web/neos/service/node/copy-and-render                             TYPO3 Neos :: Service :: Services - NodeController->copyAndRender
49. neos/Neos/Web/neos/service/node/update                                      TYPO3 Neos :: Service :: Services - NodeController->update
50. neos/Neos/Web/neos/service/node/update-and-render                           TYPO3 Neos :: Service :: Services - NodeController->updateAndRender
51. neos/Neos/Web/neos/service/node/delete                                      TYPO3 Neos :: Service :: Services - NodeController->delete
52. neos/Neos/Web/neos/service/data-source(/{dataSourceIdentifier)              TYPO3 Neos :: Service :: Services - DataSourceController->index
53. neos/Neos/Web/neos/service/content-dimensions                               TYPO3 Neos :: Service :: Services - ContentDimensionController->index()
54. neos/Neos/Web/neos/service/content-dimensions/{dimensionName}               TYPO3 Neos :: Service :: Services - ContentDimensionController->show()
55. neos/Neos/Web/{node}                                                        TYPO3 Neos :: Frontend :: Homepage
56. neos/Neos/Web/{node}.html                                                   TYPO3 Neos :: Frontend :: content with URI suffix
57. neos/Neos/Web/{node}.html                                                   TYPO3 Neos :: Frontend :: Dummy wireframe route to enable uri resolution while in wireframe mode.
58. media/thumbnail/{thumbnail}                                                 TYPO3.Media :: Thumbnail

So thanks for reading, if you made it this far :smile:
Hopefully you can help me.

Sending sweet vibes ~~~~~~~
Ole

Edit:

Some more informations you might need to help me…
The Neos version is 2.1
And i also tracked the http headers:

GET /neos/Neos/Web/setup HTTP/1.1
Host: neos.demo
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: de-DE,de;q=0.8,en-US;q=0.6,en;q=0.4
DNT: 1
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36

HTTP/1.1 404 Not Found
Connection: Keep-Alive
Content-Length: 766
Content-Type: text/html
Date: Wed, 17 Feb 2016 10:30:30 GMT
Keep-Alive: timeout=5, max=100
Server: Apache/2.2.26 (Unix) mod_fastcgi/2.4.6 mod_wsgi/3.4 Python/2.7.6 PHP/5.5.10 mod_ssl/2.2.26 OpenSSL/0.9.8zg DAV/2 mod_perl/2.0.8 Perl/v5.18.2
X-Powered-By: PHP/5.5.10

More relevant input :blush:
When i change the “uriPattern” in the “Routes.yml” back to the default value

uriPattern: '<TYPO3NeosSubroutes>'

the routes are just like:
neos/service/workspaces instead of
neos/Neos/Web/neos/service/workspaces

what makes totaly sense. When i tried to access the /Web directory Neos gave me a database error.
So i created the database and with “./flow doctrine:create” i created the tables. After flushing the cache and reloading the page it tells me:

Missing Homepage
Either no site has been defined, the site does not contain a homepage or the active site couldn't be determined.
#1346950755: Homepage could not be loaded. Probably you haven't imported a site yet
You might want to set the site's domain or import a new site in the setup.
Go to setup

But the Go to setup link is pointing to the wrong directory, and i get a 404 Not Found error. When i type the correct url in the browser i still get the

Page Not Found
Sorry, the page you requested was not found.
#1303209195: No controller could be resolved which would match your request. Package key: "", controller name: "Standard". (GET http://neos.demo/neos/Neos/Web/setup)

error.

Allright! I’ve found the error. So for all of you who use MAMP.
Make sure to uncomment the line:

Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

in your httpd.conf.
This was the first time for me working with virtual hosts. Also you have to change the RewriteBase back to /.
Finally got it working. And Hopefully this post will save some time for others :smile:
Stupid me.

Sweet vibes ~~~~~

2 Likes

Thanks for posting the response, I’m sure it will help others!