Questions tagged [apache2]
Apache (HTTP Server) /əˈpætʃiː/ is a modular cross-platform web server software with a large variety of features(called modules) including SSL, compression, log, proxy and server-side programming language interfaces like Perl, Python, Tcl, and PHP.
7,774
questions
-1
votes
1
answer
26
views
How to properly setup my environment to develop with PHP in Ubuntu 22.04 LTS?
I am a noob on PHP development, and I am trying to properly setup my environment. All I did was install the Lamp stack on my pc (I installed them separately).
The problem is that in Ubuntu the ...
0
votes
1
answer
12
views
HTTPS not working for domain, but works for subdomain
I've got a subdomain set up for my nextcloud instance at nc.example.com, and I have set up a new virtual host for my main website that I will look at creating at example.com. I ran certbot on example....
0
votes
0
answers
15
views
How to play a .ts file in Edge browser with Apache2
I use Apache2’s mod-autoindex to build a directory listing of files in a folder and MS Edge to display the list. When I click on a .mp4 file, Edge opens a video player embedded in the browser and ...
0
votes
0
answers
20
views
php scripts crash when executing myslqi_query [closed]
I've set up a LAMP server on ubuntu 20.04.
I've assigned the connect string to the variable $dbc.
I'm able to run SQL statements through php such as:
if(! $dbc )
{
die('Could not connect: '....
0
votes
1
answer
22
views
HIGH_RISK_COUNTRY_CODES ignored for HTTP/2 requests in CRS 3.3.0
I am using mod_security with CRS 3.3.0 on top of Apache 2.4. During a recent L7 DDoS attack, I recognized that certain attacks using HTTP/1.* were correctly block with HTTP 403 based on geolookup and ...
1
vote
1
answer
32
views
How to add a header if the url contain any get parameter using htaccess file?
I am running PHP in Apache2 server. I would like to add header("X-Robots-Tag: noindex", true); to my pages if the url contains any get parameters like https://example.com/? or https://...
2
votes
0
answers
34
views
Unable to connect Websocket in Production
I am using PHP, Ratchet to connect Websocket. It's working perfectly on localhost but in production nothing happens. Even its not showing any error in console.
Also this request is remains pending in ...
0
votes
0
answers
17
views
I have a mime type error in my php application [duplicate]
So, exist a website that i make some maintance, before install a ssl certificate from letsecript my css/js worked correctly, but after install this ssl don't load anymore because of the mime type ...
0
votes
0
answers
29
views
RequestHeader in not working apache2 server
There's a requirement where I want to read token from uri(token in query parameter) and set that to Authorization header for jwt-bearer authentication in apache.
for jwt authentication I am using(...
0
votes
0
answers
29
views
MySQL machine can be accessed remotely but via Django webserver it gives Error 524
I had a Django app deployed on an EC2 machine with a database on another EC2 machine. I recently had to switch IP addresses on the MySQL machine and this has caused me a lot of issues. I changed the ...
0
votes
0
answers
16
views
how to configure apache to execute Index.php with php 8 install?
I want to have a localhost on my mac to develop my website.
I install Apache and everything works good in my localhost when index is in html but when index is in php, localhost just display the code ...
0
votes
1
answer
14
views
Docker vs Apache for client applications
I have a CMS service and I have 400 clients that I serve on my own server and 20 on clients' servers.
CMS is versioned and clients can have different versions (1.1, 1.2, 1.3 etc).
I have a dedicated ...
0
votes
0
answers
10
views
Apache2 executing php but not executing html codes
How can I make it execute both html and php i used this code but it wont work
<FilesMatch ".+\.html$>
Sethandler application/x-httpd-php-source
<FilesMatch>
-1
votes
1
answer
21
views
Can you guys help me with writing a DOCKER FILE
Can you guys help me with writing a docker file for php7.4 ,apache 2 and mysql8 running on a single container ! with MySQL database configurations included in the file !
0
votes
0
answers
33
views
CORS issue with apache2 serving vite
I am trying to host an apache2 web server that redirects all traffic goint to '/tov' to a vite server running on port 8080. I am hoping this is a simple fix on the apache side as I am very unfamaliar ...
0
votes
1
answer
65
views
Unable to start Apache2: Job for apache2.service failed because the control process exited with error code
See "systemctl status apache2.service" and "journalctl -xe" for details.
root@ip-172-31-43-5:/home/ubuntu/asterisk-18.13.0/freepbx# systemctl status apache2.service
● apache2....
1
vote
0
answers
17
views
Socket.IO - Session ID unknown
Hello i made a project with node.js socket.io and proxy with apache2. Everything is ok project working fine but sometimes my all connection sending a connection error which message is "Session ID ...
0
votes
0
answers
35
views
I cannot get my virtual host to work on Ubuntu, Apache2
I moved a client's site to a new host. I have several domains/sub-domains/virtual-hosts already working. However, I cannot get this one to resolve. It keeps going to my dominate site. This is a very ...
2
votes
1
answer
34
views
PHP shell_exec not working when adding options Ubuntu Apache2
I'm trying to run a command from PHP to disconnect a user from OpenVPN Access Server
$output = shell_exec('sacli --user test --client_reason EXPIRED DisconnectUser');
echo "<pre>$...
0
votes
0
answers
16
views
Chrome extension cannot access my react app
I'm creating a react app with a phantom wallet connection. it's working on my local machine. but I added it to the apache2 server it's not working. Does anyone have any idea about that?
0
votes
0
answers
18
views
Cannot view my laravel project using the url defined in the APP_URL in my browser
I am a beginner to web dev and laravel. I have followed a number of tutorials for creating a crud application. In these tutorials, the instructor is able to see their project on their browser using ...
0
votes
1
answer
14
views
Apache2 python script works when run in command line but not when run in web browser
My python script uses boto3 and I am getting a ModuleNotFoundError: No module named 'boto3' when running my python script in the browser. I am running apache2 on my ec2 instance with ubuntu.
I have ...
0
votes
0
answers
5
views
Apache2 access to multiple virtual hosts IP on same port
I have the following configurations for apache server enabled in my Ubuntu machine:
config1.conf:
<VirtualHost *:80>
ServerAdmin user@localhost
ServerName tserver
ServerAlias tserver
...
0
votes
0
answers
23
views
Getting ModuleNotFoundError: No module named 'boto3' on Apache web server when running python script
I'm using AWS EC2 which is running apache2, and I have a python script that uses boto3. The python script runs with no error when I execute it in the command line, but when I try to run it in the web ...
-1
votes
0
answers
20
views
Should Java be executable by Apache2's user 'www-data', if not how can I achieve this
Currently I am developing a Python web application with flask. One package uses Java to read a PDF file in the right structural order. While developing on my Windows machine I never had any problems. ...
0
votes
1
answer
24
views
Getting 502 Proxy Error on JMeter during the load run
I am getting a 502 Proxy Error as mentioned below for some of the requests on the load run using JMeter Non-GUI Mode. On the local this is happening for a few of the requests. We are using a separate ...
0
votes
0
answers
28
views
remove index.php but when I click on the link come back to home page
I follow the solution on this page about rewriting the url
htaccess rewriting double // after remving index.php
It works fine but when I click on the link, for example
http://localhost/test/index.php/...
0
votes
1
answer
26
views
HTML Video buffering very slowly when source is a GET request
I'm working on a webapp that shows HTML videos to the user, the source of these videos is a get request to a flask server that will return the correct video if the user is authenticated correctly. The ...
0
votes
0
answers
28
views
I can't restart Apache2 server on Ubuntu 20.04
Because I can't restart Apache2 server, I ran systemctl status apache2.service
The result:
Jul 19 03:36:04 localhost systemd[1]: Starting The Apache HTTP Server...
Jul 19 03:36:04 localhost apachectl[...
0
votes
1
answer
25
views
Check the version of Apache web server on Suse Linux ES 12
does anyone know how I could check the version of apache2 web server on Linux Suse Enterprise Server 12?
I tried httpd -v and apache2 -v but those options don't work on this version of linux.
I would ...
0
votes
0
answers
6
views
Apache2 Output Filter fails because the data is already compressed. How do you make it work in that case?
I tried to add an apache2 filter like so:
# Global Scope
ExtFilterDefine fix_ui_sidebar mode=output intype=text/css \
cmd="/bin/sed -e 's/\\(ui-sidebar::after{[^}]*left\\):-8px;/\\1:0;/g'&...
0
votes
0
answers
15
views
Changing from Moodle server from Apache mpm-prefork to worker
I want to change my server moodle server module from prefork to worker, using
a2dismod and a2enmod,
sudo a2dismod php7.4 mpm_prefork
and then
sudo a2enmod mpm_worker
sudo systemctl restart apache2
...
0
votes
0
answers
25
views
Socket.io giving a connection error when connecting via a reverse proxy even though the connection works
I'm hosting a website on my raspberry pi using apache2 as a front end proxy for the node.js back end on port 3000. I'm using socket.io to communicate between the raspberry pi and the website. The ...
0
votes
0
answers
19
views
Center the Scrolldown-Element
I would like to center the div element "scrolldown", because currently it always appears on the left side of the screen:
Here is my code(When I paste HTML code, it will be executed):HTML: ...
0
votes
0
answers
10
views
apache with different authentication domains for a location and a sub-location
I want to configure apache2 two different locations with authentication domain, but one location is a base path of the other.
So unfortunately only the base location configuration is used.
<...
0
votes
0
answers
21
views
apache2 css or js file exist but redirect to index
My apache server is used for react application.
Server version: Apache/2.4.41 (Ubuntu)
Server built: 2022-06-14T13:30:55
my index.html have these links for js and css :
static/js/2.661d9eb9.chunk....
0
votes
0
answers
13
views
ServerAlias directive not working on Apache 2
I set the /etc/apache2/sites-available/000-default.conf file as follows, but aibver.com works well, but when I go to www.aibver.com, it is not redirected to aibver.com. Why? How do I set it up to fix ...
-1
votes
0
answers
9
views
Having a CORS problem sending picture files from production server to image server [duplicate]
I have a production server where users will upload files which will be forwarded by POST to an image processing server. Both servers run Apache2 with php. When I run the upload code on the same image ...
0
votes
1
answer
43
views
React don't run javascript when proxy by apache
I'm trying to deploy a react app locally, using apache to route the requests from port 80 to the react app port (3000 in this case). I'm using wamp for apache and serve to run the react app.
This is ...
0
votes
0
answers
16
views
Let Apache2 fire a Script located on a Client
lets say I have a Webserver (apache2) running, on this server runs my Website (HTML, PHP, JS, CSS). This site calculates and displays data. On a ButtonClickevent I want to execute a python script, ...
0
votes
0
answers
7
views
Websocket Nodej which is better Apache2 Or Nginx for ubuntu instamce
I'm working on a project where I have to use websocket apis in nodejs to update data in real time, such as open orders, pricing updates, and other things. Since my front end is react and I need to ...
1
vote
0
answers
169
views
.htaccess - remove .html and allow at the end of the url with and without trailing slash
I would like to use .htaccess to remove the .html extension in the URL and be able to access the URL with or without a trailing slash at the end.
My problem now is that I have a file (example.html) ...
0
votes
1
answer
18
views
Apache2 interpret .ext file as php
I run apache2 server and I need to make .ext file to be interpreted as php. Here's some details:
os: Debian
php --version result:
PHP 7.4.28 (cli) (built: Feb 17 2022 16:17:19) ( NTS )
Copyright (c) ...
0
votes
0
answers
16
views
xampp/apache: No installation with sudo in shell avaliable
After installing and starting xampp with apache und mysql, i want to use the command "sudo", but it does not work. Any sudo command works.
The command ... is wrong or couldn't be found.
...
0
votes
0
answers
10
views
How to forward to different ports based on URL parameter with Apache2?
I'm trying to configure a reverse proxy with apache2 where an url (or an url with a parameter) can be forwarded through multiple servers with different port depending the url (or the parameter).
I ...
0
votes
0
answers
30
views
RewriteCond and RewriteRule for www. redirection and https redirection
i found following Rewrite Rules, i would like to combine. They are stored in the /etc/apache2/sites-enabled/000-default.conf
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.example\.com$ [NC]
...
0
votes
1
answer
33
views
Angular without hash : error 404 on Apache2
I removed # from my Angular application's url but I face a BIG problem... I followed many "solutions" but the result is the same..
My application "my-app" deployed on Apache2 (in ...
0
votes
0
answers
23
views
How do I integrate a Python script into Apache2?
I want to integrate my python script in apache2 to display the output of the code in a webpage. My script show recent logs located in fail2ban, I installed cgi module and enabled it but it never ...
0
votes
1
answer
21
views
How do I send requests to two processes in Apache2?
I got two servers, a custom Rust server I've created, listening to port 4848, and a Gitea server listening at 3000. I can connect to both of these just fine if I input the IP and port directly, but ...
0
votes
0
answers
37
views
404 error. The requested URL was not found on this server
I'm trying to host my flask application on apache2 running on ubuntu 20.04. I have wsgi already enabled as well as the site. I believe the error might be because of wrong configuration but the error ...