Apache Web Server

19K

Solutions

15K

Contributors

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.

Share tech news, updates, or what's on your mind.

Sign up to Post

Hi,

need help...
i am having two servers,  web reverse proxy and tomcat application server.

1. tomcat Application server is 120.121.25.16 default port number changed in server.xml file, port number is 28056. I checked the tomcat application server, it works after port change and verified application.

2. RH7.7 reverse proxy server 10.38.11.26
i installed httpd.
/etc/httpd/conf/httpd.conf edited and changed the default port 80 to 29081 in listener.
restartng the httpd, it is failing

After port change the httpd service not coming up...

Error below...
Oct 18 23:04:34 webpxy1httpd[19252]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 10.250.245.6. Set the 'ServerNa
Oct 18 23:04:34 webpxy1 httpd[19252]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:8011
Oct 18 23:04:34 webpxy1 httpd[19252]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:8011
Oct 18 23:04:34 webpxy1 httpd[19252]: no listening sockets available, shutting down
Oct 18 23:04:34 webpxy1 httpd[19252]: no listening sockets available, shutting down
Oct 18 23:04:34 webpxy1 httpd[19252]: AH00015: Unable to open logs
Oct 18 23:04:34 webpxy1 systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Oct 18 23:04:34 webpxy1 kill[19253]: kill: cannot find process ""
Oct 18 23:04:34 webpxy1 systemd[1]: httpd.service: control process exited, code=exited status=1
Oct 18 23:04:34 …
0
HTML5 and CSS3 Fundamentals
LVL 13
HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

Hello,
which is better for apache using php-mod or php-fpm ?
thanks.
0
just built a vm running fedora 30.  downloaded and compiled apache 2.4.41 but only partially working.  i have ssl configured but https doesn't work.  the log file shows mod_ssl/openssl present, initializing servers for ssl, configuring tls extension handling, shows the certificate and private key, conf file has it listening on 443 but using netstat only shows http.  no errors int he log, selinux is disabled.  can't figure out why this piece isn't working
0
Apache server suddenly stopped.  Although we tried to reboot, it stuck. To find the root cause, which logs we should check?

[root@servername ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:httpd(8)
           man:apachectl(8)
[root@servername ~]# systemctl stop httpd
[root@servername ~]# systemctl start httpd
its stuck

It's appreciate your advices.
0
hi guys

I have an EC2 AWS instance running apache. We previously bought SSL certificates and had them installed. They have now expired. We renewed them with Godaddy.

I want to install them on the server, but I can't seem to find the location where they need to go. One of our techies who has left may have played with the http.conf file but I am unable to work this out.

Can someone give advice on how to work on this?

Thank you
Yash
0
We are getting a CORS error when trying to run and API request from one of our subdomains to another. I saw an htaccess fix...

<ifmodule mod_headers.c="">
   SetEnvIf Origin "^(.*\.MyDomain\.com)$" ORIGIN_SUB_DOMAIN=$1
   Header set Access-Control-Allow-Origin "%{ORIGIN_SUB_DOMAIN}e" env=ORIGIN_SUB_DOMAIN
   Header set Access-Control-Allow-Methods: "*"
   Header set Access-Control-Allow-Headers: "Origin, X-Requested-With, Content-Type, Accept, Authorization"
</ifmodule>

I added that to the htaccess file of where the API request was going *to*, but we still get the error. Does it need to go in the htaccess of the site the request is coming *from*? Or both? In other words, does the htaccess stuff need to live where the request originates or where the request is processed? Or both?
0
Hi,

I have added the line $wgExternalLinkTarget = '_blank' to LocalSettings.php so that external links open in a new windows and this works fine.  I also want to open internal links, e.g. PDF links in the same way.  Is there an easy solution to this, similar to external links?
0
i have a centos 7 and installing httpd on it.
i open firewall for port 80 and start httpd services. service is running ok.

in my etc/hosts ihave
127.0.0.1 localhost localhost.localdomain
..
..
10.10.1.10  localhost

in my httpd.conf  ihave
ServerName 10.10.1.10

browse 10.10.1.10 says :  Not possible to connect to website 10.10.0.10

what is wrong here?
0
Hello EE,

I am new Apache SVN , I have recently installed apache SVN using https://www.itzgeek.com/how-tos/linux/centos-how-tos/install-apache-svn-subversion-on-centos-7-rhel-7.html . I have created a new repository called "subversion " and wish to import a copy of an existing repository on another centos server into this new  svn instance . Can you please provide the proper direction on this matter .

CentOS Linux 7 (Core) , Apache /2.4.6 ( Red Hat Enterprise Linux)
0
The web application in my organizations uses Apache web server that load balance across Application servers (Tomcat instance). There are two Apache (Web server) instances that route the traffic to 4 Application server instance.

The HTTPS traffic coming to the application terminates at the Web server layer, and then communication between Web server and App server is over HTTP. My assumption is that Web server and App-server communicates over HTTP and not over HTTPS.

However lately in a discussion with my IS team I came to know that Web server communication to App server over HTTP is not considered secure, and Web server should instead communicate to App server over HTTPS.

I would like to know your views on how generally this works in your organization?
0
Angular Fundamentals
LVL 13
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Very strange problem
I have been using xampp in windows 10 for many months - no problems at all
In the last couple of days I have the problem where I try to log into phpmyadmin or any other site on my local webserver which requires a login, chrome browser just hangs
All the sites work in Firefox - no issues

I cannot see where the problem is in Chrome - I know I can recreate the Google chrome Data file and create a new one but I would rather not have to do that as I lose my settings
If I access the site from another pc with Chrome, the sites work just fine

Any ideas
0
Hi,

My company site is currently hosted on windows IIS web server  called  bob.com (for example). I have setup a separate test site that is on a ubuntu apache server hosted on a different cloud provider.
I want to edit the virtual host configuration on my test site (apache) to be a subdomain of my production website. So on the test site it will be test.bob.com. Is it enough/correct way to change the ServerName to bob.com and the ServerAlias to test.bob.com ? The reason I want to edit the virtualhost config is in order that I can put an ssl cert on test.bob.com
Are there any security concerns/ will there be any connection issues?

Thank you.
0
0
Recently I had a WordPress site for a friend. He never installed it, and someone installed it and uploaded a file that gave them access to my server.

The server wasn't really important, hence me being sort of lax with the security, but it got me thinking about how I could better secure WordPress installations on personal servers.

I was thinking I could either move the uploads directory outside of the web root. Or I could maybe configure Apache or some settings to where PHP files won't run.

I'm not going to post this on Stack Overflow because it's sort of discussion based. So any help would be appreciated.
0
I have a problem with the url rewriting in my .htaccess.
I use following lines to remove php extension:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]

Open in new window


Originally my pages where in the document root and the following lines worked great to rewrite urls
RewriteCond %{THE_REQUEST} \s/categoria\?c=(\w+)\s [NC]
RewriteRule ^ /categoria/%1? [R=302,L]

Open in new window

But now I have put my pages in different subfolders accordingly to the chosen language. The main language is spanish and I have a folder 'es' where the spanish pages are. So I changed, or better I tried to change my htaccess to use subfolders:
RewriteCond %{THE_REQUEST} \s/es/categoria\?c=(\w+)\s [NC]
RewriteRule ^ es/categoria/%1? [R=302,L]

Open in new window

This works, because the url is actually rewritten, but it also generates an Internal Server Error. After some investigation I realized that it looks like there are too many redirections and once the limit is reached, Apache raises the error 500. But the suggeted solution to put an exclamation mark to the RewriteCond for files:
RewriteCond %{REQUEST_FILENAME}.php !-f

Open in new window

prevents the removing of the php extension.
Any idea?
Thank you.
0
How to configure Apache server such that access to the public ip of the server will automatically redirect me to the ./web/index.php

vhost.conf
<VirtualHost *:80>
    ServerAdmin mis@abc.com
    ServerName abc.com
    ServerAlias www.abc.com
    DocumentRoot /var/www/html/mec/
    ##ErrorLog /var/www/html/example.com/logs/error.log
    ##CustomLog /var/www/html/example.com/logs/access.log combined
</VirtualHost>

Thx
0
Hi everybody.
In a website I use .htaccess to write SEO friendly url and in the root directory everything works fine.

.htaccess
#first I drop the file extension
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} ^(.+)\.php$
RewriteRule (.*)\.php$ /$1 [R=301,L]
#RewriteRule ^(.*)$ $1.php [QSA]

# then redirect "/vinos.php?id=xxx" to "/vinos/xxx"
RewriteCond %{THE_REQUEST} \s/vinos\.php\?v=(\w+)\s [NC]
RewriteRule ^ /vinos/%1? [R=301,L]

# internally rewrite "/vinos/xxx" to "/vinos.php?id=xxx"
RewriteRule ^vinos/(\w+)$ /vinos.php?v=$1 [L]

Open in new window


This way, the url mywebsite.com/vinos.php?v=sangre_de_toro becomes mywebsite.com/vinos/sangre_de_toro.
So in the vinos.php I have:
$url = explode("/", ($_SERVER["REQUEST_URI"]));
$vino_querido = end($url);

Open in new window

and then I use the variable $vino_querido in my sql query.

But I have added the support for two other language replicating the website pages in two subfolders 'en' and 'it' (the main langage 'es' is in the root). But in these subfolders the rewriting doesn't work.
The pages have different names, so I have added additional rules to my .htaccess:
RewriteCond %{THE_REQUEST} \s/it/vini\.php\?v=(\w+)\s [NC]
RewriteRule ^ /it/vini/%1? [R=301,L]

RewriteRule ^it/vini/(\w+)$ /it/vini.php?v=$1 [L]

RewriteCond %{THE_REQUEST} \s/en/wines\.php\?v=(\w+)\s [NC]
RewriteRule ^ /en/wines/%1? [R=301,L]

RewriteRule ^en/wines/(\w+)$ /en/wines.php?v=$1 [L]

Open in new window

But this has no effect, the url is not rewritten and the last element of the array $url in the wines.php (and vini.php) is "wines?v=blanco_afrutado" (or "vini?v=blanco_afrutado")
0
Originally I thought this would be a Wordpress question but now I want to approach this from a different perspective.

I am running a LAMP Stack in AWS using Amazon Linux. I have a company website that is a Wordpress site.

I have six domains that I want to (1) force from HTTP to HTTPS and (2) forward to "https://CompanysSite.com".

The other domains are variants, so, for example I want "http://CompanySite-inc.com" to forward to "https://CompanySite.com". And it's totally okay to have the domain name be changed to "https://CompanysSite.com" from whatever domain it came in on.

Is there a way to do this globally at the Apache level, perhaps using Mod-ReWrite? I just don't know enough about Apache to add that to the script in order to have all traffic sent to "https://CompanySite.com".

Thanks for your help!
0
Struggling with this in a .htaccess file

the root folder has the following folders

/myweb
  /api
  /spa

in the spa folder there is a folder called /dist
and in the api folder there is a folder called /api/public/

when somebody types mydomain.com/ it will access the /spa/dist folder and access all the assets under so the page displays
when somebody access the /api folder it will access the /api/public folder

but no redirects it will be rewrites.
0
OWASP: Avoiding Hacker Tricks
LVL 13
OWASP: Avoiding Hacker Tricks

Learn to build secure applications from the mindset of the hacker and avoid being exploited.

Need to install LAMP on AWS.EC2.Ubuntu.t2.micro

I can now successfully SSH into my Ubuntu server and find my folder,

/home/ubuntu

is totally empty.

I consider this a good thing.

True?

I need to install LAMP and then WordPress. (I want MySQL since I have no experience with Maria.)

Please explain the sequence of installations and the commands I need to issue.  Also, if I need to download a file, please provide me the URL.

I already have PHPMyAdmin on my MacBook, but let's worry later about reconfiguring my Mac. Instead, please tell me how to verify each element was installed properly.

Then, once we are all convinced my little AWS Ubuntu host is hosting WordPress, the fun begins and the question on EE will start flying.

Thanks
0
I'm having an issue (probably trivial) setting up apache under Ubuntu 18.04.2 (if fact I want to run NextCloud 16.0.1 on it).

Apache would not run with the following message:
-- Unit apache2.service has begun starting up.
Jun 19 23:54:35 nextcloud apachectl[10836]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive
Jun 19 23:54:36 nextcloud apachectl[10836]: Action 'start' failed.
Jun 19 23:54:36 nextcloud apachectl[10836]: The Apache error log may have more information.
Jun 19 23:54:36 nextcloud systemd[1]: apache2.service: Control process exited, code=exited status=1
Jun 19 23:54:36 nextcloud systemd[1]: apache2.service: Failed with result 'exit-code'.
Jun 19 23:54:36 nextcloud systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit apache2.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit apache2.service has failed.
--
-- The result is RESULT.
Jun 19 23:54:36 nextcloud sshd[10869]: Did not receive identification string from 192.168.0.64 port 54010

Open in new window

yet my config file has a ServerName directive as follows
<VirtualHost *:443>
    Header add Strict-Transport-Security: "max-age=15768000;includeSubdomains"
    # Header always set Referrer-Policy "strict-origin"
    SSLEngine on

### YOUR SERVER ADDRESS ###
ServerAdmin it@domain.com
ServerName mycloud.domain.com
#    ServerAlias subdomain.example.com

### SETTINGS

Open in new window

0
we installed tomcat apache in windows server in -C:\   ,  Drive.
For better management we planning to move to D: Drive.

Please advise the steps needed to achive for the same
0
For tomcat Apache server. How to convert Java JMX Agent Insecure Configuration to Secure one,
Kindly advice the steps in
0
Session variables:

I have a web page which uses session variables to submit details to my database
The website is running on my localhost (http://loalhost:888/......)
I have forwarded traffic through my router to this site which works
I appreciate this is not in a production environment so it is not an issue at the moment - just a question

If I access the website using the external dns address through the router to the internal address, and if I submit a webpage form which uses session variables to be submitted to the database, these variables are not being entered. All the other form fields are entered as expected
If I use the website on the pc which hosts the website (apache), ie internally, the session variables are entered with no problem

I was just wondering why the session variables are not being entered when the website is accessed externally
0
There seems to be some sort of mysterious redirection going on when i try to access the site at
http://fostamells.technojeeves.com/

A static file, such as http://fostamells.technojeeves.com/license.txt comes out fine but the attempt to access the homepage seems to land on a page of the company that hosts technojeeves.com. I really can't see why. Is it Wordpress doing this or what (after all it does say X-Redirect-By: WordPress)? I've attached a wget debug log of the attempt to get the homepage
wp.log
0

Apache Web Server

19K

Solutions

15K

Contributors

The Apache HTTP Server is a secure, efficient and extensible server that provides HTTP services in sync with the current HTTP standards. Typically Apache is run on a Unix-like operating system, but it is available for a wide variety of operating systems, including Linux, Novell NetWare, Mac OS-X and Windows. Released under the Apache License, Apache is open-source software.