Tag Info

Hot answers tagged

3

There isn't a way to specify a resolver or alternative IP address to use in the address bar. This would make phishing attacks very easy. There are several ways you can change the name resolution locally though: You can edit your /etc/hosts file to point www.example.com to your development IP address. There are chrome extensions to help make this process ...


2

To redirect to HTTPS: RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} But you need to have a virtual host for ssl: NameVirtualHost *:443 <VirtualHost *:443> ServerName example.com ServerAlias www.example.com SSLEngine on SSLCertificateFile /etc/apache2/ssl/apache.crt ...


2

It turns out the certificate being issued was for some reason the default Apache "snakeoil" certificate. I established this by: grep -i -r "SSLCertificateChainFile" /etc/apache2/ .. which returned 2 lines from file /etc/apache2/sites-available/default-ssl that referenced the snakeoil certificate. I commented these lines out and the browser now returns ...


2

You should check for other processes bound on a TCP socket to port 80. netstat -atp tcp | grep -i "listen" Achive Internet connections (including servers) Proto Recv-Q Send-Q Local Address Foreign Address (state) tcp4 0 0 localhost.25035 *.* LISTEN sudo lsof -i -P | grep -i "listen" COMMAND ...


2

In Apache 2.2, the directive was allow from all, but in Apache 2.4, this has become require all granted. Search for require all granted in the documentation.


2

Basically the first command: sudo chmod -R 777 /var/www/ Makes it readable, writable and executable by anyone (any user). You are on the right track with the latter commands, as you can set chown to www-data. www-data is a default user/group for Apache. Or you could create a new group and add yourself and www-data there, then assign the group to the ...


1

I would recommend checking the system log in /var/log/syslog when you do an Apache2 restart. Meaning have one terminal window opened up with you viewing the syslog via tail like this: sudo tail -f -n 10 /var/log/syslog And in the other window attempt to restart Apache. But your syntax of sudo /etc/init.d/apache2 restart seems clunky when you could just ...


1

From that output it looks like ssh is listening on port 443. Under where it COMMAND is the application or service that is running. Under NAME you have *:https That says sshd is listening on all interfaces on port https (443) I think what might be confusing is the name of the port protocol verses the actual port number that is showing up. My sshd is still ...


1

You can't. If a browser accepted a redirect from an unauthenticated (read: likely impostor) website after it failed to make a secure connection to the actual secure website, I'd be livid. That would be a pretty dire security flaw.


1

Maybe this will help for some people on shared hosts with no access to httpd, apachectl or processes: Enabled modules: ls /etc/apache2/mods-enabled/ Available modules: ls /etc/apache2/mods-available/


1

I suggest you check /server-status and sar -d -p. If you see L - Logging state and have high disk latency (see sar's column await higher than tens of msecs), then you would most likely get better performance writing to only one place on the disk rather than to hundreds opened files.


1

backslash works in .htaccess Apache 2.2 (should work in httpd.conf too) just make sure there's no other characters or white space between the backslash and the end of the line .htaccess - splitting a directive onto 2 lines demo


1

I too had the same issue. I had imported the bootstrap file in my application.css at the top. It was causing me issues. So I placed the same import at the bottom after the comment lines in the application.css file. It worked like a charm!


1

You can read the source code of /usr/sbin/apachectl. apachectl start/restart/stop calls launchctl load -w $LAUNCHD_JOB,and the job is a launch plist config /System/Library/LaunchDaemon/org.apache.httpd.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ...


1

I am pretty sure Apache will only pick up files that end in ".conf" from the conf.d directory. Try changing ..conf.d/security to ..conf.d/security.conf Alternatively you can add "ServerSignature Off" to the primary configuration file and it should work just fine.


1

As it turns out, all we needed to do was add the certificate manually to Firefox's certificate store as an exception. The weird part is just that it didn't ask to do that, but instead behaved like it could not connect. Usually it should show the "get me out of here" page.


1

G4b0, You need to add reverse proxy directive in virtual host: <VirtualHost *:80> ServerName vagrant-test.zk ServerAdmin webmaster@localhost ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080 ErrorLog ${APACHE_LOG_DIR}/vagrant-test.zk.error.log CustomLog ${APACHE_LOG_DIR}/vagrant-test.zk.access.log ...


1

By default Apache logs the messages under the directory location below /var/log/apache2 You have to be a superuser in order to navigate to the directory.


1

If no better answer, set up the server-info module, allow it for the localhost, and do a wget / curl on the URL and parse the output for the configuration parameters.


1

The best option here would be to uninstall ftp and use sftp only. It's easy to use and highly secure (military-grade secure). ACL of the wwwdoc folder needs to be setup in a way that user can write to it and change containing files/folders ownership. To connect to the server, make users use SFTP client (sftp or scp command for Linux users, WinSCP for Windows ...


1

Maybe the group you are using doesn't have rights to edit those files. Doing a ls -al will show the files and their modes. First group of rwx is for the user, second is for the group and third is for others. r is read, w is write and x is execute. Make sure that there is a w in the second group (it should appear in the middle of the file mode column, the 6th ...


1

I disabled all vhosts logging with: find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Cc]ustom[Ll]og/#CustomLog/g' {} \; find /etc/apache2/sites-enabled/* -exec sed -i 's/#*[Ee]rror[Ll]og/#ErrorLog/g' {} \; and commented out in /etc/apache2/apache2.conf #ErrorLog ${APACHE_LOG_DIR}/error.log and added ErrorLog /dev/null Restart apache gracefully: ...



Only top voted, non community-wiki answers of a minimum length are eligible