私は今、symfony を学んでいます。2 つの異なるドメインを持つ 2 つの Symfony プロジェクトを作成しました。それにもかかわらず、私の 2 番目のドメインは最初のドメインを指しており、その理由がわかりません。
私はこのチュートリアル、有名な jobeet に従っています: http://www.symfony-project.org/jobeet/1 ... rine/en/01
私の構成に注意してください:
私の /etc/apache2/httpd.conf
ServerName localhost
#From the symfony tutorial "jobeet"
# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080
# This is the configuration for your project
<VirtualHost 127.0.0.1:80>
ServerName www.jobeet.com.localhost
DocumentRoot "/home/lola/sfprojects/jobeet/web"
DirectoryIndex index.php
<Directory "/home/lola/sfprojects/jobeet/web">
AllowOverride All
Allow from All
</Directory>
Alias /sf /home/lola/sfprojects/jobeet/lib/vendor/symfony/data/web/sf
<Directory "/home/lola/sfprojects/jobeet/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
#Another symfony tutorial
NameVirtualHost 127.0.0.1:8081
<VirtualHost 127.0.0.1:80>
ServerName www.tutorial.com.localhost
DocumentRoot "/home/sfprojects/tutorial/web"
DirectoryIndex index.php
<Directory "/home/sfprojects/tutorial/web">
AllowOverride All
Allow from All
</Directory>
Alias /sf /home/lola/sfprojects/tutorial/lib/vendor/symfony/data/web/sf
<Directory "/home/lola/sfprojects/tutorial/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
チュートリアルドメインで8081ポートをリッスンしていることに注意してください。VirtualHost 127.0.0.1: 80と VirtualHost 127.0.0.1: 81の順列を試しました。どちらも機能しませんでした。(実際に何を使うかはわかりません)
私の /etc/hosts:
#From the symfony tutorial
127.0.0.1 www.jobeet.com.localhost
#From ANOTHER symfony tutorial
127.0.0.1 www.tutorial.com.localhost
その後、Apacheを再起動しました。
今、私がする とき: http : //www.jobeet.com.localhost/frontend_dev.php/私もJobeetページに行きます。チュートリアル部分を含むものに移動する必要があります。
なぜ機能しないのですか??!