Symfony production segment not working

I have a module called content and its in the application interface. When I go to localhost:8080/frontend_dev.php/content , I get a page showing just fine, with no errors. But without /frontend_dev.php I can’t access the page.

What could be wrong? Here are my front.yml settings:

prod:
  .settings:
    no_script_name: true
    logging_enabled: false

dev:
  .settings:
    error_reporting:        
    web_debug: true
    cache: false
    no_script_name: false
    etag: false

test:
  .settings:
    error_reporting:        
    cache: false
    web_debug: false
    no_script_name: false
    etag: false

all:
  .settings:
    # Form security secret (CSRF protection)
    csrf_secret: ecca0f5ffb475363f798d55871546583f60f971f

    # Output escaping settings
    escaping_strategy: true
    escaping_method: ESC_SPECIALCHARS

    # Enable the database manager
    use_database: true


    enable_modules: [default, sfGuardAuth]

What I get is 404 from a web server. Cleared symfony cache, did not work. And made the project file chown -R username.

The address that I mean localhost:8080/module/action does not work for anything. But it works the same as on another server. I am running a symfony project.

EDIT: I'm still new to symfony. I managed to log in using localhost:8080/index.php/module/action . But how can I remove index.php from routing rules? Thanks

thank

+3
source share
1 answer

It looks like mod_rewriteis not running, have you turned it on? Is it even installed?

You can check:

/your/path/to/httpd -M | grep rewrite

<IfModule mod_rewrite.c></IfModule> .htaccess. apache , mod_rewrite / .

mod rewrite, , .htaccess vhost ( httpd.conf) - :

<Directory "/path/to/your/project/web">
  AllowOverride All
  # possibly other rules....
 </Directory>
+6

Source: https://habr.com/ru/post/1788685/


All Articles