Neos Context Flow Production issue


(pawan kumar) #1

Hello,

When I Change the flow context mode to Production then it is not loading the static resources like CSS , JS (saying 404 not found )

With Development Context mode, it works fine
Is there anything do I need to change?

please find below attachment for same.


Neos Cache Location
(Daniel Lienert) #2

Hey,
Try running

./flow resource:publish

to generate the symlinks to your static resources.


(pawan kumar) #3

We are running the application on nginx server.
there itself we added fastcgi_param FLOW_CONTEXT Production;

Start the server doesn’t work.


(Soren Malling) #4

That’s purely on the server side. In CLI context, for publishing resources you must add FLOW_CONTEXT=Production before your cli call (or set it as a ENV variable on your shell


(pawan kumar) #5

I am afraid, couldn’t get it.

Would you please give more details on this.How it could it be done


(Soren Malling) #6

Run this command in your command line

FLOW_CONTEXT=Production ./flow resource:publish

To publish resources in Production context.

The CLI request is different from a web request:

Web request is served by ex. a Apache server or Nginx. You configurate that as you showed in your screenshot.

When you run CLI request it knows nothing about what webserver you use. Therefore, you need to supply it with the FLOW_CONTEXT parameter first


(pawan kumar) #7

Really Thanks a Lot,

I will check This


(pawan kumar) #8

Hi
I tried to do this but got below issue

Please correct me if I am doing wrong.
Can I check on news portal that is context (Development,Production) is currently working now


(Soren Malling) #9

Did you check what the error tells you? Does the files exists or are you missing them? They are referred to, most likely, from your content (if working with Neos CMS)


(pawan kumar) #10

We just imported the neos directory through the below command
php composer.phar create-project --no-dev neos/neos-base-distribution Neos(Is is fine? )

At the very first time, it was giving such error when trying to run the command
`FLOW_CONTEXT=Production ./flow resource: publish, just used the Neos.Demo package.

How I could check this server is running in production or development?