http.conf setup to simplify using 'localhost:81'
Posted
by
Will
on Server Fault
See other posts from Server Fault
or by Will
Published on 2012-10-14T18:28:45Z
Indexed on
2012/10/15
3:42 UTC
Read the original article
Hit count: 496
I'm installing portable wampserver within my dropbox folder so I can access anywhere. I have this achieved and accessible using http://locahost:81
I want to access it by using a different address (dropping the :81 port number) such as http://myothersite
.
I'm fairly certain I need to add a virtualhosts directove somewhere within this, but I am not Apache experienced!
This is the current Apache httpd.conf file:
ServerRoot "C:/Users/will/Dropbox/Wampee-2.1-beta-2/bin/apache/apache2.2.17"
Listen 81
ServerAdmin admin@localhost
ServerName localhost:81
DocumentRoot "C:/Users/will/Dropbox/Wampee-2.1-beta-2/www/"
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "C:/Users/will/Dropbox/Wampee-2.1-beta-2/www/">
Options Indexes FollowSymLinks
AllowOverride all
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
<IfModule dir_module>
DirectoryIndex index.php index.php3 index.html index.htm
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog "C:/Users/will/Dropbox/Wampee-2.1-beta-2/logs/apache_error.log"
LogLevel warn
<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>
CustomLog "C:/Users/will/Dropbox/Wampee-2.1-beta-2/logs/access.log" common
#CustomLog "logs/access.log" combined
</IfModule>
<IfModule alias_module>
ScriptAlias /cgi-bin/ "cgi-bin/"
</IfModule>
<IfModule cgid_module>
#Scriptsock logs/cgisock
</IfModule>
<Directory "cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
DefaultType text/plain
<IfModule mime_module>
TypesConfig conf/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .php3
</IfModule>
# Server-pool management (MPM specific)
#Include conf/extra/httpd-mpm.conf
# Multi-language error messages
#Include conf/extra/httpd-multilang-errordoc.conf
# Fancy directory listings
Include conf/extra/httpd-autoindex.conf
# Language settings
#Include conf/extra/httpd-languages.conf
# User home directories
#Include conf/extra/httpd-userdir.conf
# Real-time info on requests and configuration
#Include conf/extra/httpd-info.conf
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
# Local access to the Apache HTTP Server Manual
#Include conf/extra/httpd-manual.conf
# Distributed authoring and versioning (WebDAV)
#Include conf/extra/httpd-dav.conf
# Various default settings
#Include conf/extra/httpd-default.conf
# Secure (SSL/TLS) connections
#Include conf/extra/httpd-ssl.conf
#
# Note: The following must must be present to support
# starting without SSL on platforms with no /dev/random equivalent
# but a statically compiled-in mod_ssl.
#
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
Include "C:/Users/will/Dropbox/Wampee-2.1-beta-2/alias/*"
Include "C:/Users/will/Dropbox/Wampee-2.1-beta-2/MyWebAp
ps/etc/alias/*"
© Server Fault or respective owner