Tag Info

New answers tagged

4

I didn't know the problem was SELinux but I discovered that was the problem because I turned it off with setenforce 0 and then it worked. This is how it looked when I listed the files with ls -alZ -rwxr-xr-x. apache apache unconfined_u:object_r:httpd_sys_rw_content_t:s0 file1.pdf -rwxr-xr-x. apache apache unconfined_u:object_r:user_home_t:s0 file2.pdf so ...


3

I don't see any advantage to hard links. With hardlinks, you can move the original file (rename it) as needed without needing to recreate the link. That strikes me as a bug rather than a feature. If you want to disable a site (for example because you've just noticed that it has a major security hole), with symbolic links, you can just rename the ...


0

Apache 2.4 doesn't use the init scripts. As Saul Ortega said the apachectl script can be used to start the server. It can also be used as a standard SysV init script. Further informations can be found in the apache doc http://httpd.apache.org/docs/2.4/en/invoking.html


-1

Usually when I install apache on centOS, it gets installed in /etc/httpd/conf/ check there, otherwise do a find / -name httpd or find / -name apache. Also, if I want to start it now you start/stop it with sudo systemctl httpd start/stop or httpd -k start or apachectl start


0

For Ubuntu 14, head over to /etc/apache2/ You'll see 2 sub-directories: sites-available and sites-enabled Add any new configurations to the sites-available directory, and then use the little a2ensite script to "enable" the site (creates a link to the configuration in sites-enabled). Here's an example: in /etc/apach2/sites-available, create mysite.conf ...


1

You're right, sudo to a user with read but not write permission will run a command in a way that only has write access to files you give it permission for. sudo -u some_user cmdname Running arbitrary user-uploaded programs requires extreme security precautions. Local-root exploits are unfortunately not uncommon in Linux. Letting users run programs they ...


3

No, a file ending .html is by default just treated as static HTML.


1

Obviously RewriteRule matching anything causes the loop. Disable it. If you want to simply redirect http://haustor.org/ to http://cpt.haustor.org/, declare <VirtualHost> for each virtual host. <VirtualHost *:8081> ServerName haustor.org Redirect / http://cpt.haustor.org/ </VirtualHost> <VirtualHost *:8081> ServerName ...


1

The main issue is that you cannot turn off Dav for a subfolder. So that's why most people enable Dav for a sublocation like /svn. On the other hand, with some trickery, it can work if you use a rewrite rule and redirect to another domain which has the xsl files. You will need to set the Access-Control-Allow-Origin header on that other domain to say the ...


0

du -sk /*/. | sort -nr And descend directories from there. Usually it's logfiles in /var/log, or yum caches in /var/cache/yum . You'll have to clean it up, and then fix the particular problem yourself (to prevent it from filling again). If you're asking where to find the causes of a full disk, I would strongly advise you get some help for the actual fix. ...


1

It's a way to organise your config into logical files. It's generally easier to find ssl.conf instead of parsing through 1000 lines of httpd.conf for the ssl section. On centos, conf/httpd.conf will include conf.d/*.conf. This is probably loaded in same order the shell globs *.conf which basically amounts to alphabetical order (but I've never checked the ...


1

The main reason a service is masked is to prevent accidental starting or enabling of the service. For example firewalld can be masked with systemctl mask firewalld When starting the firewalld service, you may get the error message Failed to issue method call: Unit firewalld.service is masked. To resolve this, unmask the firewall with systemctl unmask ...


0

"<Files> [...] will be applied to any object with a basename (last component of filename) matching the specified filename". It's not what you want. Directory* don't work in .htaccess You have to use mod_rewrite. For example: <IfModule mod_rewrite.c> RewriteEngine on RewriteRule ^(foo|bar) - [F] </IfModule>


1

I am trying to write a python script which shows me the services which are running on my server. Don't do that. That's exactly what a process manager like upstart or systemd is for. Using systemd, a simple unit file for mongo might look something like: [Unit] Description=High-performance, schema-free document-oriented database After=syslog.target ...


0

I would do regex matching inside the apache config. Then use <DirectoryMatch> instead of <File> (you are regular expression matching on a directory) correct your regex's strictness (specifically the $) simplify your regex (too many brackets) <DirectoryMatch "/path/to/toplevel/(foo|bar)"> Order deny,allow Deny from all ...


0

Generally, allowing other systems to access the site under www.page.com requires it to be added to a DNS server telling that all traffic to www.page.com should go to page.com through a so called "alias". Generally you add that to the same DNS server that holds the " page.com" entry. Note that adding "www.page.com" to you /etc/hosts (as suggested in the ...


0

Break it down piece by piece. When you try to access, check the apache access/error logs. If apache doesn't log anything, then use tcpdump to confirm if your request is even reaching the server. There is no point digging deep in your configuration if you are not even sure if the network is allowing the request through.


0

Quick and dirty way: You can put a script on a cron to run every X minutes and restart mongodb if it is not running. The main thing about this simple script below, it relies on the grep response code to determine if it should restart or not. However, you need that second grep in there because the first grep will always return successful, due to the grep ...


-2

Does it run as root? In that case you can do service xxxx start in your script where xxxx is mongodb or apache.


0

First of all I would check that I could reach the web server from a second PC on your LAN. You would probably need an entry in your hosts file to map the domain name you the internal address. This will confirm that the server is bridged correctly and isn't firewalled, and can route to the LAN. I would then check that the server had a default route pointing ...



Top 50 recent answers are included