首页 > 解决方案 > 在 apache 网络服务器中运行 symfony 应用程序

问题描述

我需要在 apache 服务器上运行 symfony 应用程序。我使用以下代码创建了文件 nameofmyapplication.localhost.conf:

<Directory />
    Options FollowSymLinks
    AllowOverride All
        Require all granted
        Allow from All
</ Directory>
<Directory / opt / lampp / htdocs / docsandparcels / public />
    Options -Indexes + FollowSymLinks

AllowOverride All
        Require all granted
        Allow from All

</ Directory>
<VirtualHost *: 80>
    ServerName www.docsandparcels.localhost
    ServerAlias ​​docsandparcels.localhost
    ServerAdmin webmaster@yourdomain1.com
    DocumentRoot / opt / lampp / htdocs / docsandparcels / public /

    ErrorLog $ {APACHE_LOG_DIR} /docsandparcels.localhost-error.log
    CustomLog $ {APACHE_LOG_DIR} /docsandparcels.localhost-access.log combined
</ VirtualHost>

错误是当我尝试使用以下 url 登录时找不到 404 对象:docsandparcels.localhost / public / 我该如何解决这个问题?

标签: apachesymfonyvirtualhost

解决方案


推荐阅读