对MAMP Apache服务器302的外部请求重定向到127.0.0.1

时间:2016-05-15 06:16:01

标签: apache mamp httpd.conf

我不是一个战斗强硬的阿帕奇家伙,但我应该能够配置一个简单的内部开发盒!我不能让我的MAMP Apache服务器允许连接我的盒子的私有IP地址。它保持302重定向到127.0.0.1。

我已尝试在httpd.conf中设置虚拟主机条目,但没有运气。

请帮助,我在这里开始感到虚弱......

的httpd.conf

ServerRoot "/Applications/MAMP/Library"


<IfModule !mpm_netware.c>
PidFile logs/httpd.pid
</IfModule>


Listen 8888


LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbd_module modules/mod_authn_dbd.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule file_cache_module modules/mod_file_cache.so
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule dbd_module modules/mod_dbd.so
LoadModule bucketeer_module modules/mod_bucketeer.so
LoadModule dumpio_module modules/mod_dumpio.so
LoadModule echo_module modules/mod_echo.so
LoadModule case_filter_module modules/mod_case_filter.so
LoadModule case_filter_in_module modules/mod_case_filter_in.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule filter_module modules/mod_filter.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule charset_lite_module modules/mod_charset_lite.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule ident_module modules/mod_ident.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_scgi_module modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule ssl_module modules/mod_ssl.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule fastcgi_module modules/mod_fastcgi.so
LoadModule cgid_module modules/mod_cgid.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule perl_module modules/mod_perl.so
LoadModule wsgi_module modules/mod_wsgi.so
LoadModule xsendfile_module modules/mod_xsendfile.so

LoadModule php5_module        /Applications/MAMP/bin/php/php5.6.10/modules/libphp5.so


AddType application/x-httpd-php .php .phtml

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User xxxxxxx
Group #-1

</IfModule>
</IfModule>

<IfModule xsendfile_module>
    XSendFile on
</IfModule>



<VirtualHost 192.168.0.128:8888>
    ServerName 192.168.0.128
    DocumentRoot "/Applications/MAMP/htdocs"
</VirtualHost>


ServerAdmin you@example.com


ServerName 192.168.0.128

DocumentRoot "/Applications/MAMP/htdocs"


<Directory />
    Options Indexes FollowSymLinks
    AllowOverride All
</Directory>


<Directory "/Applications/MAMP/htdocs">

    Options All


    AllowOverride All

    Order allow,deny
    Allow from all

    XSendFilePath "/Applications/MAMP/htdocs"
</Directory>


<IfModule dir_module>
    DirectoryIndex index.html index.php

    <IfModule perl_module>
        DirectoryIndex index.pl
    </IfModule>

    <IfModule wsgi_module>
        DirectoryIndex index.wsgi index.py
    </IfModule>

</IfModule>


AccessFileName .htaccess


<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>

<Files ~ "^\.DS_Store">
    Order allow,deny
    Deny from all
</Files>


ErrorLog "/Applications/MAMP/logs/apache_error.log"


LogLevel error

<IfModule log_config_module>
       LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %>s %b" common

    <IfModule logio_module>
      LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    </IfModule>


</IfModule>

<IfModule alias_module>
    Alias /favicon.ico "/Applications/MAMP/bin/favicon.ico"

    Alias /icons/ "/Applications/MAMP/Library/icons/"

    <Directory "/Applications/MAMP/Library/icons">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    Alias /phpMyAdmin "/Applications/MAMP/bin/phpMyAdmin"
    Alias /phpmyadmin "/Applications/MAMP/bin/phpMyAdmin"

    <Directory "/Applications/MAMP/bin/phpMyAdmin">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    Alias /phpPgAdmin "/Applications/MAMP/bin/phpPgAdmin"
    Alias /phppgadmin "/Applications/MAMP/bin/phpPgAdmin"

    <Directory "/Applications/MAMP/bin/phpPgAdmin">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    Alias /phpLiteAdmin "/Applications/MAMP/bin/phpLiteAdmin"
    Alias /phpliteadmin "/Applications/MAMP/bin/phpLiteAdmin"

    <Directory "/Applications/MAMP/bin/phpLiteAdmin">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    Alias /SQLiteManager "/Applications/MAMP/bin/SQLiteManager"
    Alias /sqlitemanager "/Applications/MAMP/bin/SQLiteManager"

    <Directory "/Applications/MAMP/bin/SQLiteManager">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    Alias /MAMP "/Applications/MAMP/bin/mamp"

    <Directory "/Applications/MAMP/bin/mamp">
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
    </Directory>

    ScriptAlias /cgi-bin/ "/Applications/MAMP/cgi-bin/"

    Alias /perl/ "/Applications/MAMP/cgi-bin/"

    <IfModule perl_module>
        PerlModule ModPerl::Registry
        <Location /perl>
            SetHandler perl-script
            PerlResponseHandler ModPerl::Registry
            PerlOptions +ParseHeaders
            Options +ExecCGI
        </Location>
    </IfModule>
</IfModule>

<IfModule cgid_module>
   </IfModule>

<Directory "/Applications/MAMP/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

DefaultType text/plain

<IfModule mime_module>
    TypesConfig /Applications/MAMP/conf/apache/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddHandler cgi-script .cgi .pl
</IfModule>

<IfModule mime_magic_module>
    MIMEMagicFile /Applications/MAMP/conf/apache/magic
</IfModule>

<IfModule ssl_module>
SSLRandomSeed startup file:/dev/urandom 1024
SSLRandomSeed connect file:/dev/urandom 1024

</IfModule>

0 个答案:

没有答案