at first sorry for my bad english.
I am using Plesk 12 on my Ubuntu 14.04 Server. In the past i made Tor hidden services for my Domains simply whit the Apache virtual Host Files. And it Works fine.
But now i am using Plesk and now i dont understand hor to make a Exsiting Site reachable over a Hidden Service.
The Site www.example.com is available an the Host settings are :
<VirtualHost 85.214.50.74:7080 >
ServerName "example.com:80"
ServerAlias "www.example.com"
ServerAlias "ipv4.example.com"
ServerAdmin "admin#example.com"
.....
Now i added a second Virtual host :
<VirtualHost 85.214.50.74:8081 >
ServerName "xxxxxxxxxxxxxxxx.onion:80"
ServerAlias "xxxxxxxxxxxxxxxx.onion"
ServerAdmin "admin#xxxxxxxxxxxxxxxx.onion"
......
In the Torrc the Hidden service ist Corret and it generated a kex and a hostname. But if i reload Apache and Nginx and restart Tor, i cant reach the Hidden service.
You shouldn't add the onion site as a virtual host. Apache doesn't serve the requests to the .onion site directly.
Instead, edit your torrc file and add something like:
HiddenServiceDir /var/lib/tor/example.com
HiddenServicePort 8081 127.0.0.1:80
This runs a hidden service on port 8081 that proxies to port 80 on the local host. When you first start Tor it will generate all the keys and the onion address for your site which you can find in /var/lib/tor/example.com/hostname
If you have multiple virtual hosts, you might need to change the HiddenServicePort to use the hostname (or serveralias), but make sure it resolves locally so you're proxying to the local machine.
Related
UBUNTU + APACHE
I am running a few wordpress sites on one server (that I inherited) using VirtualHosts, and I need to configure ssl certificates for each site.
Before starting to set up certificates for each site, I tried entering each domain with the https prefix on the browser and noticed it redirects me to a site (with an invalid certificate) that is supposed to be disabled and does even show up when I run
apachectl -t -D DUMP_VHOSTS
I tried configuring the virtualhost entries for one of the sites with the valid certificate and it still goes to same old site. How can I completely disable and remove that site and the invalid certificate? I cannot find it anywhere on the server.
My Virtual host looks something like this
NameVirtualHost *:443
<VirtualHost *:443>
ServerName www.yoursite.com
DocumentRoot /var/www/site
SSLEngine on
SSLCertificateFile /path/to/www_yoursite_com.crt
SSLCertificateKeyFile /path/to/www_yoursite_com.key
SSLCertificateChainFile /path/to/DigiCertCA.crt
</VirtualHost>
If you want to disable a virtual host configuration you just need to do:
sudo a2dissite sitename
sudo systemctl restart apache2
and the issue should be resolved
I created website on Amazon Web Server. I route my ip to my domain using ROUTE 53 service. but now my website is showing APACHE TEST PAGE rather then content while if i enter my ip address/wordpress it's working properly.
Any solution please?
maybe you forgot to add a virtual host in http.conf. Apache restart is needed after this.
<VirtualHost *:80>
DocumentRoot "/www/example2"
ServerName www.example.org
# Other directives here
</VirtualHost>
https://httpd.apache.org/docs/2.4/vhosts/examples.html
Actually we are developing a new website in PHP . So is it possible to create a environment where we can share our works done .
in simple One wamp and two pc connected with lan is possible or not ? if it is how??
Within your VHOST definition there should be a <Directory ......</Directory> parameter
Inside that add
If you are using Apache 2.2.x
Allow from 192.168.1
If you are using Apache 2.4.x
Require ip 192.168.1
This will allow any ip address starting with 192.168.1 to connect to that VHOST
If you want to be specific and only allow certain ip's you can use this instead
Allow from 192.168.1.10 192.168.1.11
Or, if youare using Apache 2.4
Require ip 192.168.1.10 192.168.1.11
So your VHOST should look like this
<VirtualHost *:80>
DocumentRoot "C:/xampp/htdocs/countlead"
ServerName domain.com
ServerAlias www.domain.com
<Directory "C:/xampp/htdocs/countlead">
AllowOverride All
Require local
Require ip 192.168.2
</Directory>
</VirtualHost>
if run xampp or wamp (apache), and If Dmz (modem option) Forward packet to pc that wamp is run on it (LAN IP Address: exp:192.168.x.x) You Can Use His Remote Ip address To See (wamp/xampp) Root Directory .
Currently, I've got used to creating development domains like: projecttowork.dev.
Now I have a project, where I have to use subdomains as well, so like: module1.project.dev
I would like to start using Vagrant, because it looks awesome and I work together with some other people, and it would be great to have the same server everywhere.
In Vagrant, of course I can forward a port, like :8000 and get the server on virtual machine, but I can not figure out, how to "forward" a domain.
I tried different ways, but without any success.
Some details:
OS: Windows 8
Vagrant box: basic Ubuntu 12.04 LTS
Webserver on client: Nginx
Webserver on host: Apache (if needed)
How could I redirect this development domain to the virtual server?
-My settings in Vagrant file for network is:
config.vm.network "private_network", ip: "192.168.20.20" #choose you own
-In the host machine in /etc/hosts (linux) Windows/system32/driv.../hosts (windows)
192.168.20.20 domain.tld
-On the box check firewall (iptables - if the box is linux).
either deactivate your firewall on the box(I did this) or setup it to allow access from the host machine. (http://www.cyberciti.biz/tips/linux-iptables-examples.html)
-In the box set virtualhost for this domain (just an example):
<VirtualHost *:80>
ServerName domain.tld
DocumentRoot "/path"
RewriteEngine On
<Directory "/path">
Options Indexes FollowSymLinks
</Directory>
</VirtualHost>
Did you use etc/hosts file before to point dev domains to your dev machines IP? Same way, just add 1 row per subdomain to point them to you vagrant box IP, for example:
module1.project.dev 192.168.1.2
module2.project.dev 192.168.1.2
...
Basically what I run now on my home PC is one of these WAMP in a box applications so I can write my PHP code and use a MySQL database. That is all fine, but I run a lot of websites so now I have a folder I've called /~WEBSITES/ where I put everything making the URLs to these http://localhost/~WEBSITES/domain.com/ -- what I'd like is to be able to type http://local.domain.com/ into my address bar and have it point to my local drive, but I don't want this for everyone, just me.
Possible?
NOTE: I've running Windows XP
You'll need to setup virtual hosts with Apache, and combine that with HardCode's answer (setting your hosts file). That should do what you need.
AUTHOR EDIT: Great article, here's the quick notes on what to do (at least with the most recent version of apache2triad as your WAMP installer)
Add to C:\APACHE_INSTALL_DIRECTORY\conf\httpd.conf:
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
DocumentRoot "C:\apache2triad\htdocs"
ServerName localhost
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\apache2triad\htdocs\~WEBSITES\Domain1.com"
ServerName local.domain1.com
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "C:\apache2triad\htdocs\~WEBSITES\Domain2.com"
ServerName local.domain2.com
</VirtualHost>
Add to C:\Windows\system32\drivers\etc\hosts
127.0.0.1 localhost
127.0.0.1 local.domain1.com
127.0.0.1 local.domain2.com
Modify the text file named "hosts" found in C:\Windows\system32\drivers\etc\
Suppose you want to point www.mycustomer.com to your local host. Add in:
127.0.0.1 www.mycustomer.com
You'll need to setup virtual hosts in apache (not IIS... oops), and combine that with HardCode's answer. That should do what you need.