Tag Info

New answers tagged

0

They are probably re-written addresses. Check your htaccess files and your website configuration files for rewrite rules or virtual directories.


2

This will depend on how many virtual hosts you have setup, but you could certainly guess by using code such as this: root=$(rgrep DocumentRoot /etc/apache2/ | awk '{print $NF}' | head -n 1) echo $root This will find the DocumentRoot setting specified beneath /etc/apache2, and print the first one. You could easily use this approach to see if you find ...


0

If your script is called via CGI or FastCGI, it should find the document root in the DOCUMENT_ROOT environment variable.


0

I'm unable to upvote Sorin's response... In our local situation running Apache 2.2, and the primary app requires proxypreservehost (CQ/AEM author) to login, but a partner we proxy to requires their host in the host header. We don't need to do this with regex though, a regular <Location...> works fine. From documentation ...


-1

just had the same problem. In my case this was a network misconfiguration. server was configured with 10.0.1.111 255.255.254.0 and client was configured with 10.0.0.15 255.255.255.0. Changing the netmask on client side to /23 solved my problem. hope this could help. regards tcpdump


3

You may have made a typo in your question but the extremely insecure syntax is AllowOverride All not the plural you used. The thing is, if you have access to the main Apache configuration you're better off including your configuration in the main httpd.conf instead of relying on .htaccess files, according to the manual


0

There's a bug in apache, mod_ssl. Check this bug tracker Comment 14 supplies the same trace as you.


2

RedirectMatch permanent ^ http://newsite.com/page Should do it.


0

Looks like I was really close, and had the condition and rule in the wrong place (it was at the bottom, but should have been at the top). This is what's working: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{THE_REQUEST} ^GET [NC] RewriteRule ^media/(.*) http://s3-us-west-2.amazonaws.com/bucketname/media/$1 ...


2

Try updating your file/folders context of your apache share. # restorecon -R /var/www/html/ SELinux is useful, dont turn it off unless you have to.


2

Those errors are being caused by something scanning your server for common vulnerabilities - you can't really fix that, since getting scanned by stuff is a normal part of having a service on the internet. If your system's well secured and up to date, this kind of scanning is nothing to worry about.


3

In my opinion your optimizing the wrong thing by strictly forcing certain pages to use HTTPS and other to use plain HTTP. Simply redirect everything to HTTPS and be done with it. The computational cost of HTTPS is negligible in most cases. Your concern about browser cache with SSL seems unfounded as well. And my pet peeve: you're better off including ...


4

The simplest solution if often the best in such cases; add 40 Redirect directives to the domain1 VirtualHost configuration, where the only choice you need to make is on the permanent or temporary status of the redirect: <VirtualHost *:80> Servername domain1.com RedirectTemp /page1 http://domain2.com/new-page-1 RedirectPermanent /welcomepage ...


1

You could set up a redirect on that subdomain to the correct address, for eg. if you use PHP you cold go: <?php header('Location: http://<youraddress>:<port>'); ?> but then that would actually change the address in the address bar, so if its a cosmetic thing for the URL its not the best option.


0

At the first, check directory SVNParentPath /var/www/svn/repos exists. next, are there any subdirectories? there should be repositories directori with his own databases. If directory is empty or has no subdirectories, create any repository using svnadmin command (call manual). after creation problem still exists? then comment out all directives AUTH* , and ...


0

Check this out for squid configuration: http://www.krizna.com/centos/how-to-install-squid-proxy-on-centos-6/


0

I finally figured this out. The problem was a conflict between two plugins installed on the site (and specifically in the way the two plugins were configured.) The iThemes Security plugin (http://ithemes.com/security) is configured to make site backups periodically. The code to make the DB backup does a dump of every table in the database, and it assumes ...


1

You defined the default server in 000-default.conf as sub.example.com and it is pointed to the Apache test page. Because it comes first, it overrides the second sub.example.com virtual host you had defined in sub.conf. To fix the problem, edit 000-default.conf and remove ServerName sub.example.com from it.


1

Anything that is dependent on log files has the disadvantage that log entries are only generated once a request is complete. Apache's mod_status shows the current requests, as they're being processed.


3

When path references in an Apache configuration are not absolute (i.e. don't start with /) they are relative to the directory set in the ServerRoot directive. A common default for the ServerRoot is /etc/httpd making /etc/httpd/logs your log directory. Most packaged Apache versions create a symbolic link from /etc/httpd/logs to /var/log/httpd. Either the ...


1

Feed your access logs to apachetop and see if that's any good for you. At least apachetop fills in your "See the most busiest site/URL in real time" wish. Something like tail -f /var/log/apache2/*access_log | apachetop should work. Of course, then there's logstalgia ... :-)


0

this may be a little bit late, but I can say that blaming the OS is simply not the way to go. the OS is designed to meet the expectations of several different use case scenarios, therefore, you MUST configure it to meet your requirements. not only this, but if you are having so much load that the system is crashing, then you have to optimize your system, or ...


0

Found a solution eventually. We had to set CORS on our bucket (we use Amazon S3) since the files served to the CDN from it and not directly from the website. Here is some info on how to do it


0

What file name are you using for HTTP error logging? I suspect you might be using the same filename as for HTTPS/SSL, if that is the case try renaming the file name to ssl_error.log instead of error.log for the above posted default-ssl file. Change - ErrorLog ${APACHE_LOG_DIR}/error.log To - ErrorLog ${APACHE_LOG_DIR}/ssl_error.log


0

I figured it out the hard way but creating a test environment and sending high number of requests to it and checking the number of processes. I am not marking this as an answer. I would still like to know if displaying this information in the log files is possible.


1

You asked what's wrong with your rewrite rules. Look at these two lines in your configuration: RewriteCond %{REQUEST_URI} !^/(.+/)faces/main.jsf.* RewriteRule !^(.+)/faces/main.jsf.*$ $1/faces/main.jsf [L,R] Your RewriteCond rule will match if the url doesn't already have the faces/main.jsf bit. That looks fine. Your RewriteRule should not then be ...


0

Well, after googling some more I finally found the solution: https://stackoverflow.com/questions/18474825/what-is-the-cause-of-svn-e195019-redirect-cycle-detected-for-url/18474826#18474826 After moving the DocumentRoot to another location than the "svn root" all things works as expected. I hope this helps someone having the same problem.


1

This should work for a first level directory with alphanumeric characters. <VirtualHost *:80> ServerName example.com ProxyPass / http://1.example.com:8888/ ProxyPassReverse / http://1.example.com:8888/ RewriteEngine On # RewriteLog /tmp/rewrite.log RewriteCond %{HTTP_HOST} ...


0

you need to check your VCL against Varnish 4 https://www.varnish-cache.org/docs/trunk/whats-new/upgrading.html


0

Of course you can , and have to, have lighttpd listen on a different port from what apache is listening on. At any given time only one process can listen on a combination of "IP:PORT" by using $SERVER["socket"] == "127.0.0.1:445" your lighttpd will only listen on localhost for port 445, so it won't be available from the network unless you do some ...


0

In the /etc/rc.d directory there is also a file called rc.local, which is the rc file that init will run after everything else is done. So you could take off that from default startup sequence and put under rc.local chkconfig httpd off echo "/etc/init.d/httpd start" >> /etc/init.d/rc.local this should work for above scenario unless you have some ...


0

Mystery solved. In case this happens to anyone else: The network connection (inside VPC via LAN interface) between Apache and database server was getting congested. Upgrading the database server to a larger instance solved the problem (for the time being). Background: Amazon takes snapshots of your database every 5 minutes for its point-in-time restore ...


2

You forget to configure the inverse , besides writing your LAN requests to it's own log you need to exclude them from the regular log as well... # Where your access log is defined CustomLog logs/access_log common env=!fromlan Make sure that the SetEnvIf line is declared before the regular access log is.


0

The ssh command you are running is not run as user apache. Try this: sudo -u apache --shell /bin/bash <<<$'/usr/bin/mysqldump -u root \ -p"password" --opt dbname | gzip -c | \ ssh -o StrictHostKeyChecking=no -o \ UserKnownHostsFile=/path/to/.ssh/known_hosts -l deploy -i \ /path/to/.ssh/id_rsa user@somehost "/bin/cat > \ ...


0

Well surprisingly - commenting out this FilesMatch section solve the problem !


1

Probably you have standard set of Security Groups as well as one instance of EC2, but remember that you can make multiple Security Groups and multiple EC2 instances, so: You have to assingn Security Group to EC2 instance. Go to AWS website -> EC2 -> Instances -> select your instance -> Actions button -> Networking/Change Security Groups -> here you can ...


1

You should be able to add more patterns: RedirectMatch 403 /(\{\$itemURL\}|cro|HNAP1|wp|blog|wp/wp-admin|blog/wp-admin|wp/wp-admin/.+|)/?$ Hope this helps.


2

To allow .htaccess you need add this in httpd.conf but under the module which is configured to server your website. AllowOverride All Editing root httpd.conf not advisable but on the other hand allowing htacess is also not advisable too.you can use vhost configuration and add configuration regarding your website there.It will add extra layer of security ...


3

AH01909: sisley-mage.local.frpreprod:443:0 server certificate does NOT include an ID which matches the server name This is the problem you need to solve, the ServerName directive needs to be the same as that in the certificate openssl x509 -in server.crt -noout -subject will if you give it the correct path to your cert tell you what the CN of the ...


0

my gosh. The fix is buried in the fact that I used: setup.py install This works a little differently... setup.py develop


0

The best solution is to replace all the links in the content with the correct versions. However, during transition period, you can use the following: RewriteRule ^/www/fg(.+)$ http://www.mydomain.com$1 [R=301,L] So, if a user accesses http://www.mydomain.com/www/fg/anylink, he will be 301 redirected to http://www.mydomain.com/anylink.


2

You can add alias in apache virtualhost which can make your images accessible with same link. Alias /www/fg/ /var/www/fg/ Replace "/var/www/" with your DocumentRoot path.


3

I'm guessing that DirectoryIndex is a setting that doesn't work inside VirtualHost and instead is a global setting in apache2.conf. There is no need to guess it's in the documentation For Apache 2.2 DirectoryIndex is valid inside a VirtualHost context, and the same goes for Apache 2.4 DirectoryIndex.


0

There is may be many reasons - network lags, slow clients and so on. Nginx may help to resolve this problems if install it as reverse proxy before apache. Apache's worker process will be released immediately after response was generated, because it sends it to nginx, listening on same host and nginx will send response back to client. There are many howto ...


2

You are very close to the right format. Try changing the last part of the last line from &q=%1 [L,R=301] to &q=$1 [L,R=301]


0

try using, aliasmatch this should do as you are using both on same vhost. AliasMatch ^/blog/ /path/to/project/public/blog/index.php AliasMatch ^/whatever/ /path/to/project/public/index.php However, i would say get that isolated: i.e. use ssl.conf for ssl configuration & vhost.conf for non-ssl configuration.


-1

not sure if you need one.php inside site two or viseversa but you could always do: DirectoryIndex one.php two.php three.php And once site1.com looks for default file and it sees one.php it will use that as default. and other site2.com would not find one.php as it will show two.php? But depends upon what is ur full requirement.


0

What fixed it for me was editing httpd.conf and changing: ServerName localhost to: ServerName 127.0.0.1:80


1

Due the nature of our data (HIPAA protected) any cloud hosting isn't possible without spending a lot of money. Amazon Web Services (AWS) allows you to spin up low-cost compute instances that run just about any platform you could imagine, including a LAMP/WAMP server you could use to host your web application. AWS will also sign a Business Associate ...


1

<VirtualHost *:80> ServerName example.com RewriteEngine On RewriteRule ^/user1/(.*) http://1.example.com:8888/user1/faces/main.jsf$1 [L,P] RewriteRule ^/user1(.*) http://1.example.com:8888/user1/faces/main.jsf$1 [L,P] RewriteRule ^/(.*) http://1.example.com:8888/$1 [L,P] </VirtualHost> eg: http://example.com/user2 --> ...



Top 50 recent answers are included