Apache and Tomcat run on the same server [closed] - apache

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have currently Apache running on port 80, it has lots of domains setup. I need to install Tomcat 7 and run it also on port 80. I know how to configure it but how do I make my old Apache and Tomcat run on the same port 80 ?

You can set it up by assigning a secondary ip address to your network card. Either google the procedure or get in touch with your system admin (Windows or Unix) for assistance. Once you have the secondary ip address configured, you can setup the second instance of apache to listen to it on port 80. For your convenience you can also have a DNS entry setup for that ip addresss, so that you can access it using a name vs ip address.

Related

Moving site; new SSL [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have a site on AWS with an SSL. The site is an ec2 instance and runs WordPress.
I wanted to move the site out of Wordpress, so I have a different ec2 instance with the new site.
The domain will remain the same and I want to minimize downtime during the switchover. Can I get a new SSL for the new site before the domain DNS points there? I know the connection won't show it's secure until the SSL it matches the domain.
Is there another way to handle the migration?
If the domain isn't changing then as far as SSL is concerned neither is your site. You just need to properly configure the new site to use the same SSL certificate. To minimize downtime move the AWS Elastic IP to the new ec2 instance during migration. If done correctly you'll have no downtime at all.

How To Setup Apache behind nginx [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I want to run Apache behind nginx. because, i want to use (.htaccess) Rewrite rules.
Currently Apache is running on port 80 with nginx running on port 8080. nginx to serve only static files (jpg,png,css,js...) rest of the things to handle by Apache.
Which apache mod? mod_rpaf or mod_proxy
Apache & nginx configuration?
You've got some things backwards. If Nginx is in "front", it should be on port 80, not Apache. Also, the proxying is done by Nginx. Apache needs no proxy module installed in this configuration.
Nginx also has it's own rewrite module, and recommends against using .htaccess files.
There are lots of tutorials already out there when searching for [using nginx as a reverse proxy for Apache]. I recommend checking one for details.

Why does it cost $20 a month for Custom-domain SSL on Heroku? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Please note this is not a complaint. I am just wondering what the cost is to Heroku for providing custom-domain SSL, if there is one, as they do not provide the SSL certificate. As i understand it it is quite common to provide SSL support for free, and charge for the certificate itself.
For reference: Custom-domain SSL
In order to use your own SSL certificate with a shared server, your site must run on its own dedicated public IP address.
(since the server needs to send the SSL cert before the browser tells it which host it's connecting for)
IP addresses are a scarce commodity.

Block CNAME redirect from a domain I don't own [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
Someone has registered a domain and is using a CNAME redirect to direct traffic to my site. Google is seeing this as duplicate content and it's affecting my rankings.
Is there anyway of blocking access for traffic that comes to my site through the domainnotundermycontrol.com redirect?
Thanks in advance.
"There is no BAD publicity."
The CNAME is solely a DNS tool. The request to you server should still be sending a request for the domainnotundermycontrol.com/somepage to your apache server once it gets you're IP from the DNS lookup. Apache will see the 'ServerName' as domainnotundermycontrol.com
It sounds like the domain which you CAN control has no filtering on server name, only ip, maybe. Create a vhost for the domainnotundermycontrol.com on your server to catch all requests to that server name and serve up an index file with links to legitimate page you want people to hit or just some adwords. Then it will no longer be caught by your other vhost.
Enjoy the free traffic.

Can't browse to my EC2 Instance [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I've just (about 1 hour ago) associated an Elastic IP to my instance at Amazon EC2. If I SSH into my instance and type lynx localhost I can see that apache is responsive because I see the It works page.
However, If I browse into my instance (both via the IP itself and via the public DNS Amazon has created for me), I get Oops! Google Chrome could not connect to.. bla bla...
Should I wait some more time (in case it's due to some DNS thing) or does this indicate something is wrong?
Thanks in advance
EDIT: When I ssh into my instance, I use the full IP address and it works... (the Elastic IP I mean).
You must config the firewall to open the HTTP port.
To be more specific, for AWS this is done via Security Groups. You should create one with the ports you need opened. In most cases that's the por 80 for TCP.
You can see how to achieve this on the documentation http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html
First identify the security group of the Ec2 instance.
Next click on the security groups link in the bottom left nav.
Select the security group under which this EC2 instance lies,
and add Inbound rules by specifying the port or a custom port range.
For those of you using Centos (and perhaps other linux distibutions), you need to make sure that its FW (iptables) allows for port 80 or any other port you want.
See here on how to completely disable it (for testing purposes only!).
And here for specific rules