lunes, 19 de enero de 2015

Ammps local server to web server


Ammps discovered : a LAMP server but has softaculous incorporated.
You can add multiple domains but by default all lead to localhost.
Also does not allow external connections but we solve this problem.

You just have to edit the Apache configuration file " httpd.config " that is within Ammps .

then find within the file

#### Localhost VirtualHost ####

I Reuse code model to add my domain and anyone can connect to your browser and can see my website , hosted on a pc at home with dynamic ip appears.

<VirtualHost 127.0.0.1:80>
<Directory "{$path}/www">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory>
ServerName localhost
ServerAlias localhost 127.0.0.1
ScriptAlias /cgi-bin/ "{$path}/www/cgi-bin/"
DocumentRoot "{$path}/www"
ErrorLog "{$path}/apache/logs/error.log"
CustomLog "{$path}/apache/logs/access.log" combined
</VirtualHost>

Do not delete anything in the code but write down almost the same with the new data routed to a folder on my local server where I have my web files ,

in my case the folder is named after the domain. nda-sever.com

<VirtualHost *:80>
<Directory "{$path}/www/nda-web.com">
Options FollowSymLinks Indexes
AllowOverride All
Order deny,allow
allow from All
</Directory> Configures the second virtual host in [4] above.
ServerName nda-web.com
ServerAlias localhost 127.0.0.1
ScriptAlias /cgi-bin/ "{$path}/www/cgi-bin/"
DocumentRoot "{$path}/www/nda-web.com"
ErrorLog "{$path}/apache/logs/error.log"
CustomLog "{$path}/apache/logs/access.log" combined
</VirtualHost>

there are some changes , such as " < VirtualHost * : 80> " This allows any ip to access the folder.

" <Directory" { $ path } /www/nda-web.com "> " is the absolute path to the folder where my web .. Ammps uses a variable but serious " c: / ​​ammps / www / my - web / "for example.

" ServerName nda-web.com " this is my domain which can access the folder on my server with a web browser .

That would almost everything ... logically so you can access your pc got to have port 80 open to external connections .. you must open the port from the configuration of the router, moden etc and also configure the windows firewall or out .



No hay comentarios.:

Publicar un comentario