Randallmaster
26.09.2013, 13:07:32
Witam,
W jaki sposób mogę odpalić localhost z innych portów?
np.
localhost:80
a chciałbym odpalić inny projekt na localhost:81
mam zainstalowanego xampp, w jakis sposób mogę to zrobić?
pedro84
26.09.2013, 13:21:38
Zaskoczę Cię, trzeba zmienić port w linii
Kod
Listen 80
na
Kod
Listen TWOJ_PORT
w pliku httpd.conf.
Potem restart Apacha i już.
mar1aczi
26.09.2013, 13:23:03
W pliku
Kod
xampp\apache\conf\httpd.conf
Dodać opcję:
Kod
Listen 81
i skonfigurować virtualnego hosta dla tego portu.
Randallmaster
26.09.2013, 13:41:22
dodałem ale nie ważne co wpisze localhost:80 czy 81 to wyświetla ten samkatalog a mm zdefiniowane inne adresy
<VirtualHost *:8080>
DocumentRoot C:\xampp\htdocs\test1
ServerName localhost
<Directory "C:\xampp\htdocs\tes1">
Options Indexes FollowSymLinks Includes MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.htm index.html index.php index.php3 default.html index.cgi
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt
</VirtualHost>
<VirtualHost *:8081>
DocumentRoot C:\xampp\htdocs\test
ServerName localhost
<Directory "C:\xampp\htdocs\test">
Options Indexes FollowSymLinks Includes MultiViews ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.htm index.html index.php index.php3 default.html index.cgi
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt
</VirtualHost>
mar1aczi
26.09.2013, 13:43:53
Po dodaniu Listen zrestartowałeś usługę?
pedro84
26.09.2013, 13:57:24
Istnieje różnica pomiędzy "zmienić port", a "dodać nowe porty". Nie sądzisz?
Czytanka:
http://lowagie.com/apache_virtualhostshttp://www.mikeraynham.co.uk/articles/port...d-apache-vhostsCałość sprowadza się do dodania dodatkowej dyrektywy Listen do konfiguracji Apacza, z nowym portem. Potem tylko konfigurujesz vhost dla danego portu i już.