I'm trying to add domain in Ampps. In the admin panel http://localhost/ampps I've added domain: devvape.
I've got directory in /Applications/Ampps/www/devvape/ but when I enter http://devvape It shows me /Applications/Ampps/www/ directory.
Any ideas why?
Heres my virtual host:
<VirtualHost 127.0.0.1:80>
ServerName devvape
ServerAlias devvape
ScriptAlias /cgi-bin/ "/Applications/Ampps/www/devvape/cgi-bin/"
DocumentRoot "/Applications/Ampps/www/devvape"
ErrorLog "/Applications/Ampps/apache/logs/devvape.pl.err"
CustomLog "/Applications/Ampps/apache/logs/devvape.pl.log" combined
<Directory "/Applications/Ampps/www/devvape">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
I have port 8080 but if i don't use in link adres :8080 site looks like this enter image description here What am I doing wrong?
hots:
127.0.0.1 danzuz.eu
127.0.0.2 wordpress1.danzuz.eu
127.0.0.3 wordpress2.danzuz.eu
httpd-vhosts.conf:
<VirtualHost 127.0.0.1:8080>
ServerAdmin webmaster#danzuz.eu
DocumentRoot "C:/xampp/htdocs/"
ServerName danzuz.eu
ServerAlias danzuz.eu
ErrorLog "logs/danzuz.eu-error.log"
CustomLog "logs/danzuz.eu-access.log" common
<Directory "C:/xampp/htdocs/www/">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.2:8080>
ServerAdmin webmaster#wordpress1.danzuz.eu
DocumentRoot "C:/xampp/htdocs/www/danzuzeu"
ServerName wordpress1.danzuz.eu
ServerAlias wordpress1.danzuz.eu
ErrorLog "logs/wordpress1.danzuz-error.log"
CustomLog "logs/wordpress1.danzuz-access.log" common
<Directory "C:/xampp/htdocs/www/danzuzeu">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.3:8080>
ServerAdmin webmaster#wordpress2.danzuz.eu
DocumentRoot "C:/xampp/htdocs/www/wordpress"
ServerName wordpress2.danzuz.eu
ServerAlias wordpress2.danzuz.eu
ErrorLog "logs/wordpress2.danzuz-error.log"
CustomLog "logs/wordpress2.danzuz-access.log" common
<Directory "C:/xampp/htdocs/www/wordpress">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Thanks for help :( and sorry if i make wrong with my post it is my first time and sorry for my english
I install Xampp on Windows VPS.
I add subdomains with Cloudflare:
subdomain1 xxx.xxx.xxx.xxx
subdomain2 xxx.xxx.xxx.xxx
subdomain3 xxx.xxx.xxx.xxx
This this httpd-vhosts.conf content:
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin webmaster#mydomain.com
DocumentRoot "E:/"
ServerName xxx.xxx.xxx.xxx
ServerAlias www.xxx.xxx.xxx.xxx
ErrorLog "logs/mydomain.com-error.log"
CustomLog "logs/mydomain.com-access.log" common
</VirtualHost>
<VirtualHost subdomain1.mydomain.com:80>
ServerAdmin webmaster#mydomain.com
DocumentRoot "E:/subdomain1"
ServerName subdomain1.mydomain.com
ServerAlias www.subdomain1.mydomain.com
ErrorLog "logs/subdomain1.mydomain.com-error.log"
CustomLog "logs/subdomain1.mydomain.com-access.log" common
<Directory "E:/subdomain1">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost subdomain2.mydomain.com:80>
ServerAdmin webmaster#mydomain.com
DocumentRoot "E:/subdomain2"
ServerName subdomain2.mydomain.com
ServerAlias www.subdomain2.mydomain.com
ErrorLog "logs/subdomain2.mydomain.com-error.log"
CustomLog "logs/subdomain2.mydomain.com-access.log" common
<Directory "E:/subdomain2">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost subdomain3.mydomain.com:80>
ServerAdmin webmaster#mydomain.com
DocumentRoot "E:/subdomain3"
ServerName subdomain3.mydomain.com
ServerAlias www.subdomain3.mydomain.com
ErrorLog "logs/subdomain3.mydomain.com-error.log"
CustomLog "logs/subdomain3.mydomain.com-access.log" common
<Directory "E:/subdomain3">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Now I browse from my own PC:
http://xxx.xxx.xxx.xxx --> It shows content of E:\index.html -->RIGHT!
http://subdomain1.mydomain.com --> It shows content of E:\subdomain1\index.html -->RIGHT!
But:
http://subdomain2.mydomain.com --> It doesn't shows content of E:\subdomain2\index.html --> show content of E:\index.html -->WRONG
http://subdomain3.mydomain.com --> It doesn't shows content of E:\subdomain3\index.html --> show content of E:\index.html --> WRONG
Same with other subdomain 4, 5, 6...
I wonder why only subdomain1.mydomain.com show correctly.
Please help
Solved.
Remove block:
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin webmaster#mydomain.com
DocumentRoot "E:/"
ServerName xxx.xxx.xxx.xxx
ServerAlias www.xxx.xxx.xxx.xxx
ErrorLog "logs/mydomain.com-error.log"
CustomLog "logs/mydomain.com-access.log" common
</VirtualHost>
I'm developing laravel project, let's say www.domain.net
but when i try to enter https://www.domain.net
it's show the directory list with my server info (like Apache)
how to block access to https?
your httpd.conf should look something like this.
<VirtualHost *:443>
ServerAdmin john#email.com
#DirectoryIndex index.php
DocumentRoot "/var/www/html/project"
ServerName www.abc.com
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /path/certificate.crt
SSLCertificateKeyFile /path/certificate.key
SSLCertificateChainFile /path/keychain.crt
ServerAlias abc.in
ErrorLog logs/abc.in-error_log
CustomLog logs/abc.in-access_log common
<Directory "/var/www/html/project">
Options Includes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
The issue is my server had to be installed so I am trying to get the websites in www up and running. I have copied in my old contents of www but when I try to restart apache2 I get the following:
root#microsoft:/# service apache2 restart
Syntax error on line 1 of /etc/apache2/sites-enabled/microsoft.com:
Invalid command '../sites-available/microsoft.com', perhaps misspelled or defined by a module not included in the server configuration
Action 'configtest' failed.
etc/apache2/sites-enabled/microsoft.com
inside the file: ../sites-available/microsoft.com
/etc/apache2/sites-available
inside the file:
<VirtualHost *:80>
ServerAdmin admin#microsoft.com
ServerName microsoft.com
ServerAlias www.microsoft.com
DocumentRoot /var/www/microsoft
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/microsoft>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Any help would be amazing!
Try again closing your <VirtualHost *:80> with a </VirtualHost> after </Directory>
<VirtualHost *:80>
ServerAdmin admin#microsoft.com
ServerName microsoft.com
ServerAlias www.microsoft.com
DocumentRoot /var/www/microsoft
<Directory "/var/www/microsoft">
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/microsoft>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Looks like you symlinked it incorrectly and the sites-enabled version of the file is corrupt.
"etc/apache2/sites-enabled/microsoft.com inside the file:
../sites-available/microsoft.com"
You're showing the contents of the sites-available file, but the error message implies the content of the sites-enabled file is not a valid httpd configruation.
Follow the exiting pattern and read the error messages carefully.
Try to delete your microsoft.com file in sites-enabled, rename microsoft.com to microsoft.com.conf in sites-available. Run a2ensite and restart apache2 service.