Mac OS X Mountain Lion で mod_rewrite と適切に連携するように dnsmasq を構成する

Mac OS X Mountain Lion で mod_rewrite と適切に連携するように dnsmasq を構成する

どうしても助けが必要です。

echodittoブログの記事を読みました(http://www.echoditto.com/blog/never-touch-your-local-etchosts-file-os-x-again) をインストールし、Homebrew を使用して Mac に dnsmasq を設定するための推奨事項に従いました。現在、解決できない問題が発生しており、開発作業が完全に妨げられているため、支援が必要です。

当初、dnsmaqs を実装した後、サイトをまったく読み込めませんでしたが、httpd-vhosts.conf ファイルの内容を次のように変更することでこの問題を解決できました。

#allow access to the Hosts directory where your sites are
<Directory "/Volumes/sites">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    #you could configure the following to only allow access from localhost
    Order allow,deny
    Allow from all
</Directory>

#get the server name from the Host: header
UseCanonicalName Off
VirtualDocumentRoot /Volumes/sites/%0/

これでブラウザでhttp://ドメイン名.dev/サイトを読み込みます。

しかし、Joomla を使用すると、mod_rewrite で問題が発生します。

管理者のバックエンドを問題なくロードできます。http://ドメイン名.dev/administrator/

サイトのホームページを問題なく読み込むことができます。http://ドメイン名.dev/

しかし、通常サブページを読み込むリンクをクリックすると、例えばhttp://ドメイン名.dev/about404 エラーまたは 500 エラーが表示され、次のページ コンテンツが表示されます。

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, [email protected] and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

非動的仮想ホスティングに戻そうとしましたが、動作しなくなりました。

ブラウザでサイトにアクセスすることもできませんhttp://localhost/domainname.dev

できるだけ早くアドバイスをお願いします。そうしないと、Mac を完全に再インストールしなければならなくなり、ダウンタイムを許容できなくなります。

httpd.conf ファイル、httpd-vhosts.conf ファイル、サンプルの .htaccess ファイルを gist にアップロードしました。https://gist.github.com/alisamii/6549754

また、注目すべき点として、dnsmasq をインストールする前の設定に戻して、URL スキームを使用してローカル サイトにアクセスできるようにしようとしましたhttp://localhost/path/to/siteが、機能しなくなり、サーバー構成エラーが発生します。

関連情報